| 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_COMMON_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ |
| 7 | 7 |
| 8 #include "ash/common/system/tray/actionable_view.h" | 8 #include "ash/common/system/tray/actionable_view.h" |
| 9 #include "ash/common/system/tray/tray_popup_item_style.h" | 9 #include "ash/common/system/tray/tray_popup_item_style.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 const base::string16& text, | 75 const base::string16& text, |
| 76 bool highlight); | 76 bool highlight); |
| 77 | 77 |
| 78 // Convenience function for adding a label with padding on the left for a | 78 // Convenience function for adding a label with padding on the left for a |
| 79 // blank icon. This also sets the accessible name. Returns label after | 79 // blank icon. This also sets the accessible name. Returns label after |
| 80 // parenting it. | 80 // parenting it. |
| 81 views::Label* AddLabel(const base::string16& text, | 81 views::Label* AddLabel(const base::string16& text, |
| 82 gfx::HorizontalAlignment alignment, | 82 gfx::HorizontalAlignment alignment, |
| 83 bool highlight); | 83 bool highlight); |
| 84 | 84 |
| 85 // Convenience function for adding an optional check and a label. In the | |
| 86 // absence of a check, padding is added to align with checked items. | |
| 87 // Returns label after parenting it. | |
| 88 views::Label* AddCheckableLabel(const base::string16& text, | |
| 89 bool highlight, | |
| 90 bool checked); | |
| 91 | |
| 92 // Adds a row containing only a text label, inset on the left by the | 85 // Adds a row containing only a text label, inset on the left by the |
| 93 // horizontal space that would normally be occupied by an icon. | 86 // horizontal space that would normally be occupied by an icon. |
| 94 void AddLabelRowMd(const base::string16& text); | 87 void AddLabelRowMd(const base::string16& text); |
| 95 | 88 |
| 96 // Add an optional right icon to an already established view (call one of | 89 // Add an optional right icon to an already established view (call one of |
| 97 // the other Add* functions first). |icon_size| is the size of the icon in DP. | 90 // the other Add* functions first). |icon_size| is the size of the icon in DP. |
| 98 void AddRightIcon(const gfx::ImageSkia& image, int icon_size); | 91 void AddRightIcon(const gfx::ImageSkia& image, int icon_size); |
| 99 | 92 |
| 100 // Add an optional right view to an already established view (call one of | 93 // Add an optional right view to an already established view (call one of |
| 101 // the other Add* functions first). | 94 // the other Add* functions first). |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 int custom_height_ = 0; // Not used in material design. | 186 int custom_height_ = 0; // Not used in material design. |
| 194 AccessibilityState accessibility_state_ = AccessibilityState::DEFAULT; | 187 AccessibilityState accessibility_state_ = AccessibilityState::DEFAULT; |
| 195 base::string16 tooltip_; | 188 base::string16 tooltip_; |
| 196 | 189 |
| 197 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); | 190 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); |
| 198 }; | 191 }; |
| 199 | 192 |
| 200 } // namespace ash | 193 } // namespace ash |
| 201 | 194 |
| 202 #endif // ASH_COMMON_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ | 195 #endif // ASH_COMMON_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ |
| OLD | NEW |