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

Side by Side Diff: chrome/browser/profiles/avatar_menu_model.h

Issue 12379014: Hide add new profile menu entry for managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Extract avatar_menu_bubble_view.cc Created 7 years, 9 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 | « no previous file | chrome/browser/profiles/avatar_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) 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_PROFILES_AVATAR_MENU_MODEL_H_ 5 #ifndef CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_
6 #define CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_ 6 #define CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 // Gets the number of profiles. 72 // Gets the number of profiles.
73 size_t GetNumberOfItems(); 73 size_t GetNumberOfItems();
74 74
75 // Returns the index of the active profile. 75 // Returns the index of the active profile.
76 size_t GetActiveProfileIndex(); 76 size_t GetActiveProfileIndex();
77 77
78 // Gets the an Item at a specified index. 78 // Gets the an Item at a specified index.
79 const Item& GetItemAt(size_t index); 79 const Item& GetItemAt(size_t index);
80 80
81 // Returns true if the add profile link should be shown.
82 bool ShouldShowAddNewProfileLink() const;
83
81 // This model is also used for the always-present Mac system menubar. As the 84 // This model is also used for the always-present Mac system menubar. As the
82 // last active browser changes, the model needs to update accordingly. 85 // last active browser changes, the model needs to update accordingly.
83 void set_browser(Browser* browser) { browser_ = browser; } 86 void set_browser(Browser* browser) { browser_ = browser; }
84 87
85 // content::NotificationObserver: 88 // content::NotificationObserver:
86 virtual void Observe(int type, 89 virtual void Observe(int type,
87 const content::NotificationSource& source, 90 const content::NotificationSource& source,
88 const content::NotificationDetails& details) OVERRIDE; 91 const content::NotificationDetails& details) OVERRIDE;
89 92
90 // True if avatar menu should be displayed. 93 // True if avatar menu should be displayed.
(...skipping 18 matching lines...) Expand all
109 // List of built "menu items." 112 // List of built "menu items."
110 std::vector<Item*> items_; 113 std::vector<Item*> items_;
111 114
112 // Listens for notifications from the ProfileInfoCache. 115 // Listens for notifications from the ProfileInfoCache.
113 content::NotificationRegistrar registrar_; 116 content::NotificationRegistrar registrar_;
114 117
115 DISALLOW_COPY_AND_ASSIGN(AvatarMenuModel); 118 DISALLOW_COPY_AND_ASSIGN(AvatarMenuModel);
116 }; 119 };
117 120
118 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_ 121 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/avatar_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698