| 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 | |
| 16 namespace views { | 12 namespace views { |
| 17 | 13 |
| 18 // Layout type information for menu items. Use the instance() method to obtain | 14 // Layout type information for menu items. Use the instance() method to obtain |
| 19 // the MenuConfig for the current platform. | 15 // the MenuConfig for the current platform. |
| 20 struct VIEWS_EXPORT MenuConfig { | 16 struct VIEWS_EXPORT MenuConfig { |
| 21 explicit MenuConfig(const ui::NativeTheme* theme); | 17 MenuConfig(); |
| 22 ~MenuConfig(); | 18 ~MenuConfig(); |
| 23 | 19 |
| 24 static const MenuConfig& instance(const ui::NativeTheme* theme); | 20 static const MenuConfig& instance(); |
| 25 | 21 |
| 26 // Font list used by menus. | 22 // Font list used by menus. |
| 27 gfx::FontList font_list; | 23 gfx::FontList font_list; |
| 28 | 24 |
| 29 // Color for the arrow to scroll bookmarks. | 25 // Color for the arrow to scroll bookmarks. |
| 30 SkColor arrow_color; | 26 SkColor arrow_color; |
| 31 | 27 |
| 32 // Menu border sizes. | 28 // Menu border sizes. |
| 33 int menu_vertical_border_size; | 29 int menu_vertical_border_size; |
| 34 int menu_horizontal_border_size; | 30 int menu_horizontal_border_size; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 114 |
| 119 // Delay, in ms, between when menus are selected or moused over and the menu | 115 // Delay, in ms, between when menus are selected or moused over and the menu |
| 120 // appears. | 116 // appears. |
| 121 int show_delay; | 117 int show_delay; |
| 122 | 118 |
| 123 // Radius of the rounded corners of the menu border. Must be >= 0. | 119 // Radius of the rounded corners of the menu border. Must be >= 0. |
| 124 int corner_radius; | 120 int corner_radius; |
| 125 | 121 |
| 126 private: | 122 private: |
| 127 // Configures a MenuConfig as appropriate for the current platform. | 123 // Configures a MenuConfig as appropriate for the current platform. |
| 128 void Init(const ui::NativeTheme* theme); | 124 void Init(); |
| 129 | |
| 130 // TODO: temporary until we standardize. | |
| 131 void InitAura(const ui::NativeTheme* theme); | |
| 132 }; | 125 }; |
| 133 | 126 |
| 134 } // namespace views | 127 } // namespace views |
| 135 | 128 |
| 136 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_ | 129 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_ |
| OLD | NEW |