| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void SetAccessiblityState(AccessibilityState accessibility_state); | 114 void SetAccessiblityState(AccessibilityState accessibility_state); |
| 115 | 115 |
| 116 void set_highlight_color(SkColor color) { highlight_color_ = color; } | 116 void set_highlight_color(SkColor color) { highlight_color_ = color; } |
| 117 void set_default_color(SkColor color) { default_color_ = color; } | 117 void set_default_color(SkColor color) { default_color_ = color; } |
| 118 void set_text_highlight_color(SkColor c) { text_highlight_color_ = c; } | 118 void set_text_highlight_color(SkColor c) { text_highlight_color_ = c; } |
| 119 void set_text_default_color(SkColor color) { text_default_color_ = color; } | 119 void set_text_default_color(SkColor color) { text_default_color_ = color; } |
| 120 | 120 |
| 121 views::Label* text_label() { return text_label_; } | 121 views::Label* text_label() { return text_label_; } |
| 122 views::Label* sub_text_label() { return sub_text_label_; } | 122 views::Label* sub_text_label() { return sub_text_label_; } |
| 123 | 123 |
| 124 bool hover() const { return hover_; } | |
| 125 | |
| 126 void set_tooltip(const base::string16& tooltip) { tooltip_ = tooltip; } | 124 void set_tooltip(const base::string16& tooltip) { tooltip_ = tooltip; } |
| 127 | 125 |
| 128 protected: | 126 protected: |
| 129 // Overridden from views::View. | 127 // Overridden from views::View. |
| 130 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; | 128 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 131 | 129 |
| 132 // Sets the highlighted color on a text label if |hover| is set. | 130 // Sets the highlighted color on a text label if |hover| is set. |
| 133 void SetHoverHighlight(bool hover); | 131 void SetHoverHighlight(bool hover); |
| 134 | 132 |
| 135 TriView* tri_view() { return tri_view_; } | 133 TriView* tri_view() { return tri_view_; } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 int custom_height_ = 0; // Not used in material design. | 184 int custom_height_ = 0; // Not used in material design. |
| 187 AccessibilityState accessibility_state_ = AccessibilityState::DEFAULT; | 185 AccessibilityState accessibility_state_ = AccessibilityState::DEFAULT; |
| 188 base::string16 tooltip_; | 186 base::string16 tooltip_; |
| 189 | 187 |
| 190 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); | 188 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); |
| 191 }; | 189 }; |
| 192 | 190 |
| 193 } // namespace ash | 191 } // namespace ash |
| 194 | 192 |
| 195 #endif // ASH_COMMON_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ | 193 #endif // ASH_COMMON_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ |
| OLD | NEW |