| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // the other Add* functions first). |icon_size| is the size of the icon in DP. | 62 // the other Add* functions first). |icon_size| is the size of the icon in DP. |
| 63 void AddRightIcon(const gfx::ImageSkia& image, int icon_size); | 63 void AddRightIcon(const gfx::ImageSkia& image, int icon_size); |
| 64 | 64 |
| 65 // Add an optional right view to an already established view (call one of | 65 // Add an optional right view to an already established view (call one of |
| 66 // the other Add* functions first). | 66 // the other Add* functions first). |
| 67 void AddRightView(views::View* view); | 67 void AddRightView(views::View* view); |
| 68 | 68 |
| 69 // Hide or show the right view. | 69 // Hide or show the right view. |
| 70 void SetRightViewVisible(bool visible); | 70 void SetRightViewVisible(bool visible); |
| 71 | 71 |
| 72 // Sets text for the sub label. Precondition for this function is that |
| 73 // |text_label_| is non-null. |
| 74 void SetSubText(const base::string16& sub_text); |
| 75 |
| 72 // 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 |
| 73 // equals to kTrayPopupItemHeight. | 77 // equals to kTrayPopupItemHeight. |
| 74 void SetExpandable(bool expandable); | 78 void SetExpandable(bool expandable); |
| 75 | 79 |
| 76 // Changes the view's current accessibility state. This will fire an | 80 // Changes the view's current accessibility state. This will fire an |
| 77 // accessibility event if needed. | 81 // accessibility event if needed. |
| 78 void SetAccessiblityState(AccessibilityState accessibility_state); | 82 void SetAccessiblityState(AccessibilityState accessibility_state); |
| 79 | 83 |
| 80 views::Label* text_label() { return text_label_; } | 84 views::Label* text_label() { return text_label_; } |
| 81 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... |
| 118 TriView* tri_view_ = nullptr; | 122 TriView* tri_view_ = nullptr; |
| 119 bool expandable_ = false; | 123 bool expandable_ = false; |
| 120 AccessibilityState accessibility_state_ = AccessibilityState::DEFAULT; | 124 AccessibilityState accessibility_state_ = AccessibilityState::DEFAULT; |
| 121 | 125 |
| 122 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); | 126 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); |
| 123 }; | 127 }; |
| 124 | 128 |
| 125 } // namespace ash | 129 } // namespace ash |
| 126 | 130 |
| 127 #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ | 131 #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ |
| OLD | NEW |