Chromium Code Reviews| 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 // Menu for the multi-profile button displayed on the browser frame. |
| 14 // | |
| 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): | |
| 17 // enable and fill in as part of multi-profile work. | |
| 18 class ProfileMenuModel : public ui::SimpleMenuModel, | 14 class ProfileMenuModel : public ui::SimpleMenuModel, |
| 19 public ui::SimpleMenuModel::Delegate { | 15 public ui::SimpleMenuModel::Delegate { |
| 20 public: | 16 public: |
| 21 explicit ProfileMenuModel(Browser* browser); | 17 explicit ProfileMenuModel(Browser* browser); |
| 22 virtual ~ProfileMenuModel(); | 18 virtual ~ProfileMenuModel(); |
| 23 | 19 |
| 24 // ui::SimpleMenuModel::Delegate implementation | 20 // ui::SimpleMenuModel::Delegate implementation |
| 25 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 21 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
| 26 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 22 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
| 27 virtual bool GetAcceleratorForCommandId( | 23 virtual bool GetAcceleratorForCommandId( |
| 28 int command_id, ui::Accelerator* accelerator) OVERRIDE; | 24 int command_id, ui::Accelerator* accelerator) OVERRIDE; |
| 29 virtual void ExecuteCommand(int command_id) OVERRIDE; | 25 virtual void ExecuteCommand(int command_id) OVERRIDE; |
| 30 | 26 |
| 27 enum { | |
|
sky
2011/07/08 21:01:44
enums should be first in a section.
sail
2011/07/08 21:53:57
Done.
| |
| 28 COMMAND_PROFILE_NAME, | |
| 29 COMMAND_CHOOSE_AVATAR_ICON, | |
| 30 COMMAND_CUSTOMIZE_PROFILE, | |
| 31 COMMAND_DELETE_PROFILE, | |
| 32 COMMAND_CREATE_NEW_PROFILE, | |
| 33 COMMAND_SWITCH_PROFILE_MENU, | |
| 34 // The profiles submenu contains a menu item for each profile. For the i'th | |
| 35 // profile the command ID is COMMAND_SWITCH_TO_PROFILE + i. Since there can | |
| 36 // be any number of profiles this must be the last command id. | |
| 37 COMMAND_SWITCH_TO_PROFILE, | |
| 38 }; | |
| 39 | |
| 31 private: | 40 private: |
| 32 Browser* browser_; | 41 Browser* browser_; |
| 33 scoped_ptr<ui::SimpleMenuModel> switch_profiles_sub_menu_model_; | 42 scoped_ptr<ui::SimpleMenuModel> switch_profiles_sub_menu_model_; |
| 34 | 43 |
| 35 DISALLOW_COPY_AND_ASSIGN(ProfileMenuModel); | 44 DISALLOW_COPY_AND_ASSIGN(ProfileMenuModel); |
| 36 }; | 45 }; |
| 37 | 46 |
| 38 #endif // CHROME_BROWSER_UI_PROFILE_MENU_MODEL_H_ | 47 #endif // CHROME_BROWSER_UI_PROFILE_MENU_MODEL_H_ |
| OLD | NEW |