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

Side by Side Diff: ui/views/controls/menu/menu_config.h

Issue 1514693006: Revert of Use a single views::MenuConfig instance for each platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase revert on https://codereview.chromium.org/1504743003 Created 5 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
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/menu/menu_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_
7 7
8 #include "third_party/skia/include/core/SkColor.h" 8 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/gfx/font_list.h" 9 #include "ui/gfx/font_list.h"
10 #include "ui/views/views_export.h" 10 #include "ui/views/views_export.h"
11 11
12 namespace ui {
13 class NativeTheme;
14 }
15
12 namespace views { 16 namespace views {
13 17
14 // Layout type information for menu items. Use the instance() method to obtain 18 // Layout type information for menu items. Use the instance() method to obtain
15 // the MenuConfig for the current platform. 19 // the MenuConfig for the current platform.
16 struct VIEWS_EXPORT MenuConfig { 20 struct VIEWS_EXPORT MenuConfig {
17 MenuConfig(); 21 explicit MenuConfig(const ui::NativeTheme* theme);
18 ~MenuConfig(); 22 ~MenuConfig();
19 23
20 static const MenuConfig& instance(); 24 static const MenuConfig& instance(const ui::NativeTheme* theme);
21 25
22 // Font list used by menus. 26 // Font list used by menus.
23 gfx::FontList font_list; 27 gfx::FontList font_list;
24 28
25 // Color for the arrow to scroll bookmarks. 29 // Color for the arrow to scroll bookmarks.
26 SkColor arrow_color; 30 SkColor arrow_color;
27 31
28 // Menu border sizes. 32 // Menu border sizes.
29 int menu_vertical_border_size; 33 int menu_vertical_border_size;
30 int menu_horizontal_border_size; 34 int menu_horizontal_border_size;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 118
115 // Delay, in ms, between when menus are selected or moused over and the menu 119 // Delay, in ms, between when menus are selected or moused over and the menu
116 // appears. 120 // appears.
117 int show_delay; 121 int show_delay;
118 122
119 // Radius of the rounded corners of the menu border. Must be >= 0. 123 // Radius of the rounded corners of the menu border. Must be >= 0.
120 int corner_radius; 124 int corner_radius;
121 125
122 private: 126 private:
123 // Configures a MenuConfig as appropriate for the current platform. 127 // Configures a MenuConfig as appropriate for the current platform.
124 void Init(); 128 void Init(const ui::NativeTheme* theme);
129
130 // TODO: temporary until we standardize.
131 void InitAura(const ui::NativeTheme* theme);
125 }; 132 };
126 133
127 } // namespace views 134 } // namespace views
128 135
129 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_ 136 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_
OLDNEW
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/menu/menu_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698