OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROFILE_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_PROFILE_MENU_MODEL_H_ |
6 #define CHROME_BROWSER_UI_PROFILE_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_PROFILE_MENU_MODEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/base/models/simple_menu_model.h" | 9 #include "ui/base/models/simple_menu_model.h" |
10 | 10 |
11 class Browser; | 11 class Browser; |
12 | 12 |
13 // ProfileMenuModel | 13 // ProfileMenuModel |
14 // | 14 // |
15 // Menu for the multi-profile button displayed on the browser frame when the | 15 // Menu for the multi-profile button displayed on the browser frame when the |
16 // user is in a multi-profile-enabled account. Stub for now. TODO(mirandac): | 16 // user is in a multi-profile-enabled account. Stub for now. TODO(mirandac): |
17 // enable and fill in as part of multi-profile work. | 17 // enable and fill in as part of multi-profile work. |
18 class ProfileMenuModel : public ui::SimpleMenuModel, | 18 class ProfileMenuModel : public ui::SimpleMenuModel, |
19 public ui::SimpleMenuModel::Delegate { | 19 public ui::SimpleMenuModel::Delegate { |
20 public: | 20 public: |
21 explicit ProfileMenuModel(Browser* browser); | 21 explicit ProfileMenuModel(Browser* browser); |
Robert Sesek
2011/07/08 14:50:42
Can Browser be NULL? I'm looking at the main menu
| |
22 virtual ~ProfileMenuModel(); | 22 virtual ~ProfileMenuModel(); |
23 | 23 |
24 // ui::SimpleMenuModel::Delegate implementation | 24 // ui::SimpleMenuModel::Delegate implementation |
25 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 25 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
26 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 26 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
27 virtual bool GetAcceleratorForCommandId( | 27 virtual bool GetAcceleratorForCommandId( |
28 int command_id, ui::Accelerator* accelerator) OVERRIDE; | 28 int command_id, ui::Accelerator* accelerator) OVERRIDE; |
29 virtual void ExecuteCommand(int command_id) OVERRIDE; | 29 virtual void ExecuteCommand(int command_id) OVERRIDE; |
30 | 30 |
31 private: | 31 private: |
32 enum { | 32 enum { |
33 COMMAND_CUSTOMIZE_PROFILE, | 33 COMMAND_CUSTOMIZE_PROFILE, |
34 COMMAND_CREATE_NEW_PROFILE, | |
35 COMMAND_DELETE_PROFILE, | 34 COMMAND_DELETE_PROFILE, |
36 }; | 35 }; |
37 | 36 |
38 Browser* browser_; | 37 Browser* browser_; |
38 scoped_ptr<ui::SimpleMenuModel> switch_profiles_sub_menu_model_; | |
39 | 39 |
40 DISALLOW_COPY_AND_ASSIGN(ProfileMenuModel); | 40 DISALLOW_COPY_AND_ASSIGN(ProfileMenuModel); |
41 }; | 41 }; |
42 | 42 |
43 #endif // CHROME_BROWSER_UI_PROFILE_MENU_MODEL_H_ | 43 #endif // CHROME_BROWSER_UI_PROFILE_MENU_MODEL_H_ |
44 | |
45 | |
OLD | NEW |