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

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 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.
28 // However - for now only ChromeOS will use it in all situations and the
sky 2012/08/21 03:03:25 aura
Mr4D (OOO till 08-26) 2012/08/21 15:37:16 Not entirely sure if that is (still) the same thin
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 120
113 private: 121 private:
114 // Creates and configures a new MenuConfig as appropriate for the current 122 // Creates and configures a new MenuConfig as appropriate for the current
115 // platform. 123 // platform.
116 static MenuConfig* Create(); 124 static MenuConfig* Create();
117 }; 125 };
118 126
119 } // namespace views 127 } // namespace views
120 128
121 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_ 129 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698