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

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

Issue 2527513002: Update ash shelf/tray focus rects. (Closed)
Patch Set: don't fix palette Created 4 years 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_constants.h" 9 #include "ash/common/system/tray/tray_constants.h"
10 #include "ash/common/system/tray/tray_popup_ink_drop_style.h" 10 #include "ash/common/system/tray/tray_popup_ink_drop_style.h"
11 #include "ash/common/system/tray/tri_view.h" 11 #include "ash/common/system/tray/tri_view.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 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 Painter;
24 class Separator; 25 class Separator;
25 class Slider; 26 class Slider;
26 class SliderListener; 27 class SliderListener;
27 class ToggleButton; 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 {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
94 // Returns a ToggleButton that has been configured for system menu layout. 95 // Returns a ToggleButton that has been configured for system menu layout.
95 static views::ToggleButton* CreateToggleButton( 96 static views::ToggleButton* CreateToggleButton(
96 views::ButtonListener* listener, 97 views::ButtonListener* listener,
97 int accessible_name_id); 98 int accessible_name_id);
98 99
100 // Creates a default focus painter used for most things in tray popups.
101 static std::unique_ptr<views::Painter> CreateFocusPainter();
102
99 // Sets up |view| to be a sticky header in a tray detail scroll view. 103 // Sets up |view| to be a sticky header in a tray detail scroll view.
100 static void ConfigureAsStickyHeader(views::View* view); 104 static void ConfigureAsStickyHeader(views::View* view);
101 105
102 // Configures |container_view| just like CreateDefaultRowView() would 106 // Configures |container_view| just like CreateDefaultRowView() would
103 // configure |container| on its returned TriView. To be used when mutliple 107 // configure |container| on its returned TriView. To be used when mutliple
104 // targetable areas are required within a single row. 108 // targetable areas are required within a single row.
105 static void ConfigureContainer(TriView::Container container, 109 static void ConfigureContainer(TriView::Container container,
106 views::View* container_view); 110 views::View* container_view);
107 111
108 // Creates a button for use in the system menu that only has a visible border 112 // Creates a button for use in the system menu that only has a visible border
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // |ink_drop_style|. 187 // |ink_drop_style|.
184 static gfx::Rect GetInkDropBounds(TrayPopupInkDropStyle ink_drop_style, 188 static gfx::Rect GetInkDropBounds(TrayPopupInkDropStyle ink_drop_style,
185 const views::View* host); 189 const views::View* host);
186 190
187 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils); 191 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils);
188 }; 192 };
189 193
190 } // namespace ash 194 } // namespace ash
191 195
192 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ 196 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698