OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |