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 CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/base/models/simple_menu_model.h" | 10 #include "ui/base/models/simple_menu_model.h" |
11 | 11 |
12 // A SimpleMenuModel subclass that allows the system menu for a window to be | 12 // A SimpleMenuModel subclass that allows the system menu for a window to be |
13 // wrapped. | 13 // wrapped. |
14 class SystemMenuModel : public ui::SimpleMenuModel { | 14 class SystemMenuModel : public ui::SimpleMenuModel { |
15 public: | 15 public: |
16 explicit SystemMenuModel(ui::SimpleMenuModel::Delegate* delegate); | 16 explicit SystemMenuModel(ui::SimpleMenuModel::Delegate* delegate); |
17 virtual ~SystemMenuModel(); | 17 virtual ~SystemMenuModel(); |
18 | 18 |
19 // Overridden from ui::MenuModel: | 19 // Overridden from ui::MenuModel: |
20 virtual int GetFirstItemIndex(gfx::NativeMenu native_menu) const OVERRIDE; | 20 virtual int GetFirstItemIndex(gfx::NativeMenu native_menu) const OVERRIDE; |
21 | 21 |
22 protected: | |
23 // Overridden from ui::SimpleMenuModel: | |
24 virtual int FlipIndex(int index) const OVERRIDE; | |
25 | |
26 private: | 22 private: |
27 DISALLOW_COPY_AND_ASSIGN(SystemMenuModel); | 23 DISALLOW_COPY_AND_ASSIGN(SystemMenuModel); |
28 }; | 24 }; |
29 | 25 |
30 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_ | 26 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_ |
OLD | NEW |