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

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

Issue 2506133003: [ash-md] Allows ToggleButton to have a border and adds focus rectangle (Closed)
Patch Set: [ash-md] Allows ToggleButton to have a border and adds focus rectangle (comments) 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 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 "ash/common/login_status.h" 8 #include "ash/common/login_status.h"
9 #include "ash/common/system/tray/tray_popup_ink_drop_style.h" 9 #include "ash/common/system/tray/tray_popup_ink_drop_style.h"
10 #include "ash/common/system/tray/tri_view.h" 10 #include "ash/common/system/tray/tri_view.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 12
13 namespace views { 13 namespace views {
14 class Border; 14 class Border;
15 class ButtonListener; 15 class ButtonListener;
16 class ImageView; 16 class ImageView;
17 class InkDrop; 17 class InkDrop;
18 class InkDropRipple; 18 class InkDropRipple;
19 class InkDropHighlight; 19 class InkDropHighlight;
20 class InkDropHostView; 20 class InkDropHostView;
21 class InkDropMask; 21 class InkDropMask;
22 class Label; 22 class Label;
23 class LabelButton; 23 class LabelButton;
24 class LayoutManager; 24 class LayoutManager;
25 class Separator; 25 class Separator;
26 class Slider; 26 class Slider;
27 class SliderListener; 27 class SliderListener;
28 class ToggleButton;
28 } // namespace views 29 } // namespace views
29 30
30 namespace ash { 31 namespace ash {
31 32
32 // Factory/utility functions used by the system menu. 33 // Factory/utility functions used by the system menu.
33 class TrayPopupUtils { 34 class TrayPopupUtils {
34 public: 35 public:
35 // Creates a default container view to be used by system menu rows that are 36 // Creates a default container view to be used by system menu rows that are
36 // either a single targetable area or not targetable at all. The caller takes 37 // either a single targetable area or not targetable at all. The caller takes
37 // over ownership of the created view. 38 // over ownership of the created view.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // is used for all 'more' images as well as other images that appear in this 85 // is used for all 'more' images as well as other images that appear in this
85 // region, e.g. audio output icon. 86 // region, e.g. audio output icon.
86 // 87 //
87 // TODO(bruthig): Update all default rows to use this. 88 // TODO(bruthig): Update all default rows to use this.
88 static views::ImageView* CreateMoreImageView(); 89 static views::ImageView* CreateMoreImageView();
89 90
90 // Returns a slider configured for proper layout within a TriView container 91 // Returns a slider configured for proper layout within a TriView container
91 // with a FillLayout. 92 // with a FillLayout.
92 static views::Slider* CreateSlider(views::SliderListener* listener); 93 static views::Slider* CreateSlider(views::SliderListener* listener);
93 94
95 // Returns a ToggleButton that has been configured for system menu layout.
96 static views::ToggleButton* CreateToggleButton(
97 views::ButtonListener* listener,
98 int accessible_name_id);
99
94 // Sets up |view| to be a sticky header in a tray detail scroll view. 100 // Sets up |view| to be a sticky header in a tray detail scroll view.
95 static void ConfigureAsStickyHeader(views::View* view); 101 static void ConfigureAsStickyHeader(views::View* view);
96 102
97 // Configures |container_view| just like CreateDefaultRowView() would 103 // Configures |container_view| just like CreateDefaultRowView() would
98 // configure |container| on its returned TriView. To be used when mutliple 104 // configure |container| on its returned TriView. To be used when mutliple
99 // targetable areas are required within a single row. 105 // targetable areas are required within a single row.
100 static void ConfigureContainer(TriView::Container container, 106 static void ConfigureContainer(TriView::Container container,
101 views::View* container_view); 107 views::View* container_view);
102 108
103 // Creates a button for use in the system menu that only has a visible border 109 // Creates a button for use in the system menu that only has a visible border
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // |ink_drop_style|. 172 // |ink_drop_style|.
167 static gfx::Rect GetInkDropBounds(TrayPopupInkDropStyle ink_drop_style, 173 static gfx::Rect GetInkDropBounds(TrayPopupInkDropStyle ink_drop_style,
168 const views::View* host); 174 const views::View* host);
169 175
170 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils); 176 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils);
171 }; 177 };
172 178
173 } // namespace ash 179 } // namespace ash
174 180
175 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ 181 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698