| 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 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 Loading... |
| 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_ |
| OLD | NEW |