OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #ifndef CONTROLS_MENU_VIEWS_MENU_2_H_ | 5 #ifndef CONTROLS_MENU_VIEWS_MENU_2_H_ |
6 #define CONTROLS_MENU_VIEWS_MENU_2_H_ | 6 #define CONTROLS_MENU_VIEWS_MENU_2_H_ |
7 | 7 |
8 #include "base/gfx/native_widget_types.h" | 8 #include "base/gfx/native_widget_types.h" |
| 9 #include "base/scoped_ptr.h" |
9 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "views/controls/menu/menu_wrapper.h" |
10 | 12 |
11 namespace gfx { | 13 namespace gfx { |
12 class Point; | 14 class Point; |
13 } | 15 } |
14 class SkBitmap; | 16 class SkBitmap; |
15 | 17 |
16 namespace views { | 18 namespace views { |
17 | 19 |
18 class Accelerator; | 20 class Accelerator; |
19 class Menu2; | 21 class Menu2; |
20 class MenuWrapper; | |
21 | 22 |
22 // The Menu2Model is an interface implemented by an object that provides the | 23 // The Menu2Model is an interface implemented by an object that provides the |
23 // content of a menu. | 24 // content of a menu. |
24 class Menu2Model { | 25 class Menu2Model { |
25 public: | 26 public: |
26 virtual ~Menu2Model() {} | 27 virtual ~Menu2Model() {} |
27 | 28 |
28 // The type of item. | 29 // The type of item. |
29 enum ItemType { | 30 enum ItemType { |
30 TYPE_COMMAND, | 31 TYPE_COMMAND, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // For submenus. | 136 // For submenus. |
136 gfx::NativeMenu GetNativeMenu() const; | 137 gfx::NativeMenu GetNativeMenu() const; |
137 | 138 |
138 // Accessors. | 139 // Accessors. |
139 Menu2Model* model() const { return model_; } | 140 Menu2Model* model() const { return model_; } |
140 | 141 |
141 private: | 142 private: |
142 Menu2Model* model_; | 143 Menu2Model* model_; |
143 | 144 |
144 // The object that actually implements the menu. | 145 // The object that actually implements the menu. |
145 MenuWrapper* wrapper_; | 146 scoped_ptr<MenuWrapper> wrapper_; |
146 | 147 |
147 DISALLOW_COPY_AND_ASSIGN(Menu2); | 148 DISALLOW_COPY_AND_ASSIGN(Menu2); |
148 }; | 149 }; |
149 | 150 |
150 } // namespace views | 151 } // namespace views |
151 | 152 |
152 #endif // CONTROLS_MENU_VIEWS_MENU_2_H_ | 153 #endif // CONTROLS_MENU_VIEWS_MENU_2_H_ |
OLD | NEW |