OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ | 5 #ifndef ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ |
6 #define ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ | 6 #define ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ |
7 | 7 |
8 #include "ash/system/tray/actionable_view.h" | 8 #include "ash/system/tray/actionable_view.h" |
9 #include "ash/system/tray/tray_popup_item_style.h" | 9 #include "ash/system/tray/tray_popup_item_style.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 // the other Add* functions first). |icon_size| is the size of the icon in DP. | 61 // the other Add* functions first). |icon_size| is the size of the icon in DP. |
62 void AddRightIcon(const gfx::ImageSkia& image, int icon_size); | 62 void AddRightIcon(const gfx::ImageSkia& image, int icon_size); |
63 | 63 |
64 // Add an optional right view to an already established view (call one of | 64 // Add an optional right view to an already established view (call one of |
65 // the other Add* functions first). | 65 // the other Add* functions first). |
66 void AddRightView(views::View* view); | 66 void AddRightView(views::View* view); |
67 | 67 |
68 // Hide or show the right view. | 68 // Hide or show the right view. |
69 void SetRightViewVisible(bool visible); | 69 void SetRightViewVisible(bool visible); |
70 | 70 |
71 // Sets text for the sub label. Precondition for this function is that the | |
72 // main label should be present. Empty string can be used to clear the sub | |
tdanderson
2017/04/24 15:43:39
nit: instead say something like "|text_label_| is
mohsen
2017/04/25 05:10:01
Done.
| |
73 // label. | |
74 void SetSubText(const base::string16& sub_text); | |
75 | |
71 // Allows view to expand its height. Size of unexapandable view is fixed and | 76 // Allows view to expand its height. Size of unexapandable view is fixed and |
72 // equals to kTrayPopupItemHeight. | 77 // equals to kTrayPopupItemHeight. |
73 void SetExpandable(bool expandable); | 78 void SetExpandable(bool expandable); |
74 | 79 |
75 // Changes the view's current accessibility state. This will fire an | 80 // Changes the view's current accessibility state. This will fire an |
76 // accessibility event if needed. | 81 // accessibility event if needed. |
77 void SetAccessiblityState(AccessibilityState accessibility_state); | 82 void SetAccessiblityState(AccessibilityState accessibility_state); |
78 | 83 |
79 views::Label* text_label() { return text_label_; } | 84 views::Label* text_label() { return text_label_; } |
80 views::Label* sub_text_label() { return sub_text_label_; } | 85 views::Label* sub_text_label() { return sub_text_label_; } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 TriView* tri_view_ = nullptr; | 122 TriView* tri_view_ = nullptr; |
118 bool expandable_ = false; | 123 bool expandable_ = false; |
119 AccessibilityState accessibility_state_ = AccessibilityState::DEFAULT; | 124 AccessibilityState accessibility_state_ = AccessibilityState::DEFAULT; |
120 | 125 |
121 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); | 126 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); |
122 }; | 127 }; |
123 | 128 |
124 } // namespace ash | 129 } // namespace ash |
125 | 130 |
126 #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ | 131 #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ |
OLD | NEW |