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

Side by Side Diff: chrome/browser/ui/profile_menu_model.h

Issue 7331017: Multi-Profiles: Add icon chooser to profiles menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Multi-Profiles: Add icon chooser to profiles menu Created 9 years, 5 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/profile_menu_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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:
17 enum {
18 COMMAND_PROFILE_NAME,
19 COMMAND_CHOOSE_AVATAR_ICON,
20 COMMAND_CUSTOMIZE_PROFILE,
21 COMMAND_DELETE_PROFILE,
22 COMMAND_CREATE_NEW_PROFILE,
23 COMMAND_SWITCH_PROFILE_MENU,
24 // The profiles submenu contains a menu item for each profile. For the i'th
25 // profile the command ID is COMMAND_SWITCH_TO_PROFILE + i. Since there can
26 // be any number of profiles this must be the last command id.
27 COMMAND_SWITCH_TO_PROFILE,
28 };
29
21 explicit ProfileMenuModel(Browser* browser); 30 explicit ProfileMenuModel(Browser* browser);
22 virtual ~ProfileMenuModel(); 31 virtual ~ProfileMenuModel();
23 32
24 // ui::SimpleMenuModel::Delegate implementation 33 // ui::SimpleMenuModel::Delegate implementation
25 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; 34 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
26 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; 35 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
27 virtual bool GetAcceleratorForCommandId( 36 virtual bool GetAcceleratorForCommandId(
28 int command_id, ui::Accelerator* accelerator) OVERRIDE; 37 int command_id, ui::Accelerator* accelerator) OVERRIDE;
29 virtual void ExecuteCommand(int command_id) OVERRIDE; 38 virtual void ExecuteCommand(int command_id) OVERRIDE;
30 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_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/profile_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698