| OLD | NEW |
| 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 only has a visible border |
| 27 // when being hovered/clicked. Caller assumes ownership. |
| 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 MD, this is a prominent text |
| 33 // button. For non-MD, this does the same thing as the above. Caller assumes |
| 34 // ownership. |
| 35 views::LabelButton* CreateTrayPopupButton(views::ButtonListener* listener, |
| 36 const base::string16& text); |
| 37 |
| 24 // Sets up a Label properly for the tray (sets color, font etc.). | 38 // Sets up a Label properly for the tray (sets color, font etc.). |
| 25 void SetupLabelForTray(views::Label* label); | 39 void SetupLabelForTray(views::Label* label); |
| 26 | 40 |
| 27 // TODO(jennyz): refactor these two functions to SystemTrayItem. | 41 // TODO(jennyz): refactor these two functions to SystemTrayItem. |
| 28 // Sets the empty border of an image tray item for adjusting the space | 42 // Sets the empty border of an image tray item for adjusting the space |
| 29 // around it. | 43 // around it. |
| 30 void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment); | 44 void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment); |
| 31 // Sets the empty border around a label tray item for adjusting the space | 45 // Sets the empty border around a label tray item for adjusting the space |
| 32 // around it. | 46 // around it. |
| 33 void SetTrayLabelItemBorder(TrayItemView* tray_view, ShelfAlignment alignment); | 47 void SetTrayLabelItemBorder(TrayItemView* tray_view, ShelfAlignment alignment); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 44 bool CanOpenWebUISettings(LoginStatus status); | 58 bool CanOpenWebUISettings(LoginStatus status); |
| 45 | 59 |
| 46 // Creates and returns a vertical separator to be used between two items in a | 60 // 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 | 61 // material design system menu row. The caller assumes ownership of the |
| 48 // returned separator. | 62 // returned separator. |
| 49 views::Separator* CreateVerticalSeparator(); | 63 views::Separator* CreateVerticalSeparator(); |
| 50 | 64 |
| 51 } // namespace ash | 65 } // namespace ash |
| 52 | 66 |
| 53 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_UTILS_H_ | 67 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_UTILS_H_ |
| OLD | NEW |