Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: ash/system/tray/hover_highlight_view.h

Issue 2844933003: [Ash] Disallow calling HoverHighlightView::SetSubText() with an empty string (Closed)
Patch Set: comments addressed Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/system/tray/hover_highlight_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 72 // Sets the text of |sub_text_label_| to |sub_text|. Prior to calling this
73 // |text_label_| is non-null. 73 // function, |text_label_| must not be null and |sub_text| must not be empty.
74 void SetSubText(const base::string16& sub_text); 74 void SetSubText(const base::string16& sub_text);
75 75
76 // 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
77 // equals to kTrayPopupItemHeight. 77 // equals to kTrayPopupItemHeight.
78 void SetExpandable(bool expandable); 78 void SetExpandable(bool expandable);
79 79
80 // Changes the view's current accessibility state. This will fire an 80 // Changes the view's current accessibility state. This will fire an
81 // accessibility event if needed. 81 // accessibility event if needed.
82 void SetAccessiblityState(AccessibilityState accessibility_state); 82 void SetAccessiblityState(AccessibilityState accessibility_state);
83 83
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 TriView* tri_view_ = nullptr; 122 TriView* tri_view_ = nullptr;
123 bool expandable_ = false; 123 bool expandable_ = false;
124 AccessibilityState accessibility_state_ = AccessibilityState::DEFAULT; 124 AccessibilityState accessibility_state_ = AccessibilityState::DEFAULT;
125 125
126 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView); 126 DISALLOW_COPY_AND_ASSIGN(HoverHighlightView);
127 }; 127 };
128 128
129 } // namespace ash 129 } // namespace ash
130 130
131 #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_ 131 #endif // ASH_SYSTEM_TRAY_HOVER_HIGHLIGHT_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ash/system/tray/hover_highlight_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698