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

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

Issue 10837317: Setting the touch wrench menu as default menu for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed second review Created 8 years, 4 months 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 | Annotate | Revision Log
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.h" 9 #include "ui/gfx/font.h"
10 #include "ui/views/views_export.h" 10 #include "ui/views/views_export.h"
11 11
12 namespace views { 12 namespace views {
13 13
14 // 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
15 // the MenuConfig for the current platform. 15 // the MenuConfig for the current platform.
16 struct VIEWS_EXPORT MenuConfig { 16 struct VIEWS_EXPORT MenuConfig {
17 MenuConfig(); 17 MenuConfig();
18 ~MenuConfig(); 18 ~MenuConfig();
19 19
20 // Resets the single shared MenuConfig instance. The next time instance() is 20 // Resets the single shared MenuConfig instance. The next time instance() is
21 // invoked a new MenuConfig is created and configured. 21 // invoked a new MenuConfig is created and configured.
22 static void Reset(); 22 static void Reset();
23 23
24 // Returns the single shared MenuConfig instance, creating if necessary. 24 // Returns the single shared MenuConfig instance, creating if necessary.
25 static const MenuConfig& instance(); 25 static const MenuConfig& instance();
26 26
27 // Going forward, every platform will use the new style menu.
sky 2012/08/21 19:36:29 You don't need to get into the specific here, some
Mr4D (OOO till 08-26) 2012/08/21 21:34:54 The TODO makes no sense. As long as there is no co
28 // However - for now only Aura will use it in all situations and the
29 // other OS'es will follow later and should remain as they are. Since this
30 // is of temporary nature this fix changes as little as possible and
31 // determines with this function if the new type or the old type should be
32 // used.
33 static const bool IsNewMenu();
34
27 // Font used by menus. 35 // Font used by menus.
28 gfx::Font font; 36 gfx::Font font;
29 37
30 // Normal text color. 38 // Normal text color.
31 SkColor text_color; 39 SkColor text_color;
32 40
33 // Submenu horizontal margin size. 41 // Submenu horizontal margin size.
34 int submenu_horizontal_margin_size; 42 int submenu_horizontal_margin_size;
35 43
36 // Submenu vertical margin size. 44 // Submenu vertical margin size.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 int radio_width; 82 int radio_width;
75 int radio_height; 83 int radio_height;
76 84
77 // Size of the submenu arrow. 85 // Size of the submenu arrow.
78 int arrow_height; 86 int arrow_height;
79 int arrow_width; 87 int arrow_width;
80 88
81 // Width of the gutter. Only used if render_gutter is true. 89 // Width of the gutter. Only used if render_gutter is true.
82 int gutter_width; 90 int gutter_width;
83 91
84 // Height of the separator. 92 // Height of a normal separator (ui::NORMAL_SEPARATOR).
85 int separator_height; 93 int separator_height;
86 94
95 // Height of a ui::UPPER_SEPARATOR.
96 int separator_upper_height;
97
98 // Height of a ui::LOWER_SEPARATOR.
99 int separator_lower_height;
100
101 // Height of a ui::SPACING_SEPARATOR.
102 int separator_spacing_height;
103
87 // Whether or not the gutter should be rendered. The gutter is specific to 104 // Whether or not the gutter should be rendered. The gutter is specific to
88 // Vista. 105 // Vista.
89 bool render_gutter; 106 bool render_gutter;
90 107
91 // Are mnemonics shown? 108 // Are mnemonics shown?
92 bool show_mnemonics; 109 bool show_mnemonics;
93 110
94 // Height of the scroll arrow. 111 // Height of the scroll arrow.
95 int scroll_arrow_height; 112 int scroll_arrow_height;
96 113
(...skipping 15 matching lines...) Expand all
112 129
113 private: 130 private:
114 // Creates and configures a new MenuConfig as appropriate for the current 131 // Creates and configures a new MenuConfig as appropriate for the current
115 // platform. 132 // platform.
116 static MenuConfig* Create(); 133 static MenuConfig* Create();
117 }; 134 };
118 135
119 } // namespace views 136 } // namespace views
120 137
121 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_ 138 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698