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

Side by Side Diff: chrome/browser/app_menu_model.h

Issue 482006: Make a shared app menu model and update win and mac to use it. Remove the NSM... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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/nibs/Toolbar.xib ('k') | chrome/browser/app_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')
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // LICENSE file.
4
5 #ifndef CHROME_BROWSER_APP_MENU_MODEL_H_
6 #define CHROME_BROWSER_APP_MENU_MODEL_H_
7
8 #include "app/menus/simple_menu_model.h"
9 #include "base/ref_counted.h"
10 #include "base/scoped_ptr.h"
11 #include "chrome/browser/user_data_manager.h"
12
13 class Browser;
14
15 // A menu model that builds the contents of the app menu. This menu has only
16 // one level (no submenus).
17 class AppMenuModel : public menus::SimpleMenuModel,
18 public GetProfilesHelper::Delegate {
19 public:
20 explicit AppMenuModel(menus::SimpleMenuModel::Delegate* delegate,
21 Browser* browser);
22 virtual ~AppMenuModel();
23
24 // Overridden from GetProfilesHelper::Delegate
25 virtual void OnGetProfilesDone(
26 const std::vector<std::wstring>& profiles);
27
28 private:
29 void Build();
30
31 // The top-level model.
32 scoped_ptr<menus::SimpleMenuModel> model_;
33 // Contents of the profiles menu to populate with profile names.
34 scoped_ptr<menus::SimpleMenuModel> profiles_menu_contents_;
35
36 // Helper class to enumerate profiles information on the file thread.
37 scoped_refptr<GetProfilesHelper> profiles_helper_;
38
39 Browser* browser_; // weak
40
41 DISALLOW_COPY_AND_ASSIGN(AppMenuModel);
42 };
43
44 #endif // CHROME_BROWSER_APP_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/app/nibs/Toolbar.xib ('k') | chrome/browser/app_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698