1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
ash / glanceables / classroom / glanceables_classroom_item_view.h [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_GLANCEABLES_CLASSROOM_GLANCEABLES_CLASSROOM_ITEM_VIEW_H_
#define ASH_GLANCEABLES_CLASSROOM_GLANCEABLES_CLASSROOM_ITEM_VIEW_H_
#include "ash/ash_export.h"
#include "ash/glanceables/classroom/glanceables_classroom_types.h"
#include "base/functional/callback_forward.h"
#include "ui/views/controls/button/button.h"
namespace ash {
struct GlanceablesClassroomAssignment;
// A view which shows information about a single assignment in the classroom
// glanceable.
class ASH_EXPORT GlanceablesClassroomItemView : public views::Button {
METADATA_HEADER(GlanceablesClassroomItemView, views::Button)
public:
GlanceablesClassroomItemView(const GlanceablesClassroomAssignment* assignment,
base::RepeatingClosure pressed_callback);
GlanceablesClassroomItemView(const GlanceablesClassroomItemView&) = delete;
GlanceablesClassroomItemView& operator=(const GlanceablesClassroomItemView&) =
delete;
~GlanceablesClassroomItemView() override;
// views::Button:
void Layout(PassKey) override;
void OnEnabledChanged() override;
private:
void UpdateAccessibleDefaultAction();
};
} // namespace ash
#endif // ASH_GLANCEABLES_CLASSROOM_GLANCEABLES_CLASSROOM_ITEM_VIEW_H_