| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_POPUP_UTILS_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/common/login_status.h" | 10 #include "ash/common/login_status.h" |
| 11 #include "ash/common/system/tray/tray_constants.h" | 11 #include "ash/common/system/tray/tray_constants.h" |
| 12 #include "ash/common/system/tray/tray_popup_ink_drop_style.h" | 12 #include "ash/common/system/tray/tray_popup_ink_drop_style.h" |
| 13 #include "ash/common/system/tray/tri_view.h" | 13 #include "ash/common/system/tray/tri_view.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 | 15 |
| 16 namespace views { | 16 namespace views { |
| 17 class ButtonListener; | 17 class ButtonListener; |
| 18 class CustomButton; |
| 18 class ImageView; | 19 class ImageView; |
| 19 class InkDrop; | 20 class InkDrop; |
| 20 class InkDropRipple; | 21 class InkDropRipple; |
| 21 class InkDropHighlight; | 22 class InkDropHighlight; |
| 22 class InkDropHostView; | 23 class InkDropHostView; |
| 23 class InkDropMask; | 24 class InkDropMask; |
| 24 class Label; | 25 class Label; |
| 25 class LabelButton; | 26 class LabelButton; |
| 26 class Painter; | 27 class Painter; |
| 27 class Separator; | 28 class Separator; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 static views::Slider* CreateSlider(views::SliderListener* listener); | 107 static views::Slider* CreateSlider(views::SliderListener* listener); |
| 107 | 108 |
| 108 // Returns a ToggleButton that has been configured for system menu layout. | 109 // Returns a ToggleButton that has been configured for system menu layout. |
| 109 static views::ToggleButton* CreateToggleButton( | 110 static views::ToggleButton* CreateToggleButton( |
| 110 views::ButtonListener* listener, | 111 views::ButtonListener* listener, |
| 111 int accessible_name_id); | 112 int accessible_name_id); |
| 112 | 113 |
| 113 // Creates a default focus painter used for most things in tray popups. | 114 // Creates a default focus painter used for most things in tray popups. |
| 114 static std::unique_ptr<views::Painter> CreateFocusPainter(); | 115 static std::unique_ptr<views::Painter> CreateFocusPainter(); |
| 115 | 116 |
| 117 // Common setup for various buttons in the system menu. |
| 118 static void ConfigureTrayPopupButton(views::CustomButton* button); |
| 119 |
| 116 // Sets up |view| to be a sticky header in a tray detail scroll view. | 120 // Sets up |view| to be a sticky header in a tray detail scroll view. |
| 117 static void ConfigureAsStickyHeader(views::View* view); | 121 static void ConfigureAsStickyHeader(views::View* view); |
| 118 | 122 |
| 119 // Configures a |view| to have a visible separator below. | 123 // Configures a |view| to have a visible separator below. |
| 120 static void ShowStickyHeaderSeparator(views::View* view, bool show_separator); | 124 static void ShowStickyHeaderSeparator(views::View* view, bool show_separator); |
| 121 | 125 |
| 122 // Configures |container_view| just like CreateDefaultRowView() would | 126 // Configures |container_view| just like CreateDefaultRowView() would |
| 123 // configure |container| on its returned TriView. To be used when mutliple | 127 // configure |container| on its returned TriView. To be used when mutliple |
| 124 // targetable areas are required within a single row. | 128 // targetable areas are required within a single row. |
| 125 static void ConfigureContainer(TriView::Container container, | 129 static void ConfigureContainer(TriView::Container container, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // |ink_drop_style|. | 212 // |ink_drop_style|. |
| 209 static gfx::Rect GetInkDropBounds(TrayPopupInkDropStyle ink_drop_style, | 213 static gfx::Rect GetInkDropBounds(TrayPopupInkDropStyle ink_drop_style, |
| 210 const views::View* host); | 214 const views::View* host); |
| 211 | 215 |
| 212 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils); | 216 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils); |
| 213 }; | 217 }; |
| 214 | 218 |
| 215 } // namespace ash | 219 } // namespace ash |
| 216 | 220 |
| 217 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ | 221 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ |
| OLD | NEW |