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

Side by Side Diff: ash/common/system/tray/tray_utils.h

Issue 2463163002: Update chromeos system menu buttons for MD. (Closed)
Patch Set: rebase Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TRAY_UTILS_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_UTILS_H_
6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_UTILS_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_UTILS_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/login_status.h" 10 #include "ash/common/login_status.h"
11 #include "ash/public/cpp/shelf_types.h" 11 #include "ash/public/cpp/shelf_types.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 13
14 namespace views { 14 namespace views {
15 class ButtonListener;
15 class Label; 16 class Label;
17 class LabelButton;
16 class Separator; 18 class Separator;
17 class View; 19 class View;
18 } 20 }
19 21
20 namespace ash { 22 namespace ash {
21 23
22 class TrayItemView; 24 class TrayItemView;
23 25
26 // Creates a button for use in the system menu that has no visible border when
tdanderson 2016/11/01 22:38:50 nit: please add a comment that the caller assumes
Evan Stade 2016/11/01 23:54:09 I have a hard time seeing how one would reasonably
27 // not being hovered/clicked.
tdanderson 2016/11/01 22:38:50 nit: consider eliminating the double negative in t
Evan Stade 2016/11/01 23:54:09 Done.
28 views::LabelButton* CreateTrayPopupBorderlessButton(
29 views::ButtonListener* listener,
30 const base::string16& text);
31
32 // Creates a button for use in the system menu. For non-MD, this does the same
tdanderson 2016/11/01 22:38:50 nit: please give a bit more description about what
Evan Stade 2016/11/01 23:54:09 Done.
33 // thing as the above.
34 views::LabelButton* CreateTrayPopupButton(views::ButtonListener* listener,
35 const base::string16& text);
36
24 // Sets up a Label properly for the tray (sets color, font etc.). 37 // Sets up a Label properly for the tray (sets color, font etc.).
25 void SetupLabelForTray(views::Label* label); 38 void SetupLabelForTray(views::Label* label);
26 39
27 // TODO(jennyz): refactor these two functions to SystemTrayItem. 40 // TODO(jennyz): refactor these two functions to SystemTrayItem.
28 // Sets the empty border of an image tray item for adjusting the space 41 // Sets the empty border of an image tray item for adjusting the space
29 // around it. 42 // around it.
30 void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment); 43 void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment);
31 // Sets the empty border around a label tray item for adjusting the space 44 // Sets the empty border around a label tray item for adjusting the space
32 // around it. 45 // around it.
33 void SetTrayLabelItemBorder(TrayItemView* tray_view, ShelfAlignment alignment); 46 void SetTrayLabelItemBorder(TrayItemView* tray_view, ShelfAlignment alignment);
(...skipping 10 matching lines...) Expand all
44 bool CanOpenWebUISettings(LoginStatus status); 57 bool CanOpenWebUISettings(LoginStatus status);
45 58
46 // Creates and returns a vertical separator to be used between two items in a 59 // Creates and returns a vertical separator to be used between two items in a
47 // material design system menu row. The caller assumes ownership of the 60 // material design system menu row. The caller assumes ownership of the
48 // returned separator. 61 // returned separator.
49 views::Separator* CreateVerticalSeparator(); 62 views::Separator* CreateVerticalSeparator();
50 63
51 } // namespace ash 64 } // namespace ash
52 65
53 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_UTILS_H_ 66 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698