OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_COMMON_SYSTEM_TRAY_SPECIAL_POPUP_ROW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SPECIAL_POPUP_ROW_H_ |
6 #define ASH_COMMON_SYSTEM_TRAY_SPECIAL_POPUP_ROW_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_SPECIAL_POPUP_ROW_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/resources/vector_icons/vector_icons.h" | 9 #include "ash/resources/vector_icons/vector_icons.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
12 #include "ui/views/view.h" | 12 #include "ui/views/view.h" |
13 | 13 |
14 namespace views { | 14 namespace views { |
15 class Button; | 15 class Button; |
16 class ButtonListener; | 16 class ButtonListener; |
17 class ImageButton; | |
18 class Label; | 17 class Label; |
19 class ToggleButton; | 18 class ToggleButton; |
20 } | 19 } |
21 | 20 |
22 namespace ash { | 21 namespace ash { |
| 22 class SystemMenuButton; |
23 class ThrobberView; | 23 class ThrobberView; |
24 class TrayItemView; | 24 class TrayItemView; |
25 class TrayPopupHeaderButton; | 25 class TrayPopupHeaderButton; |
26 class ViewClickListener; | 26 class ViewClickListener; |
27 | 27 |
28 // For material design, this class represents the top title row for detailed | 28 // For material design, this class represents the top title row for detailed |
29 // views and handles the creation and layout of its elements (back button, | 29 // views and handles the creation and layout of its elements (back button, |
30 // title, settings button, and possibly other buttons). For non-MD, this class | 30 // title, settings button, and possibly other buttons). For non-MD, this class |
31 // represents the bottom row of detailed views and the bottom row of the | 31 // represents the bottom row of detailed views and the bottom row of the |
32 // system menu (date, help, power, and lock). This row has a fixed height. | 32 // system menu (date, help, power, and lock). This row has a fixed height. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 // Used to add views to |views_before_content_container_| and | 75 // Used to add views to |views_before_content_container_| and |
76 // |views_after_content_container_|, respectively. Views are added to both | 76 // |views_after_content_container_|, respectively. Views are added to both |
77 // containers in a left-to-right order. | 77 // containers in a left-to-right order. |
78 void AddViewBeforeContent(views::View* view); | 78 void AddViewBeforeContent(views::View* view); |
79 void AddViewAfterContent(views::View* view); | 79 void AddViewAfterContent(views::View* view); |
80 void AddViewAfterContent(views::View* view, bool add_separator); | 80 void AddViewAfterContent(views::View* view, bool add_separator); |
81 | 81 |
82 void SetTextLabelMd(int string_id, ViewClickListener* listener); | 82 void SetTextLabelMd(int string_id, ViewClickListener* listener); |
83 void SetTextLabelNonMd(int string_id, ViewClickListener* listener); | 83 void SetTextLabelNonMd(int string_id, ViewClickListener* listener); |
84 views::ImageButton* AddImageButton(views::ButtonListener* listener, | 84 SystemMenuButton* AddSystemMenuButton(views::ButtonListener* listener, |
85 const gfx::VectorIcon& icon, | 85 const gfx::VectorIcon& icon, |
86 int accessible_name_id, | 86 int accessible_name_id, |
87 bool after_content); | 87 bool after_content); |
88 | 88 |
89 // The container for the views positioned before |content_|. | 89 // The container for the views positioned before |content_|. |
90 views::View* views_before_content_container_; | 90 views::View* views_before_content_container_; |
91 | 91 |
92 // The main content of this row, typically a label. | 92 // The main content of this row, typically a label. |
93 views::View* content_; | 93 views::View* content_; |
94 | 94 |
95 // The container for the views positioned after |content_|. | 95 // The container for the views positioned after |content_|. |
96 views::View* views_after_content_container_; | 96 views::View* views_after_content_container_; |
97 | 97 |
98 // A pointer to the label which is parented to |content_|; this is non-null | 98 // A pointer to the label which is parented to |content_|; this is non-null |
99 // only if this row's content is a single label. Not owned. | 99 // only if this row's content is a single label. Not owned. |
100 views::Label* label_; | 100 views::Label* label_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(SpecialPopupRow); | 102 DISALLOW_COPY_AND_ASSIGN(SpecialPopupRow); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace ash | 105 } // namespace ash |
106 | 106 |
107 #endif // ASH_COMMON_SYSTEM_TRAY_SPECIAL_POPUP_ROW_H_ | 107 #endif // ASH_COMMON_SYSTEM_TRAY_SPECIAL_POPUP_ROW_H_ |
OLD | NEW |