OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_PROFILE_LIST_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_LIST_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_LIST_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_LIST_H_ |
7 | 7 |
8 #include "chrome/browser/profiles/avatar_menu.h" | 8 #include "chrome/browser/profiles/avatar_menu.h" |
9 | 9 |
10 class ProfileInfoInterface; | 10 class ProfileInfoInterface; |
11 | 11 |
12 // This model represents the profiles added to Chrome. | 12 // This model represents the profiles added to Chrome. |
13 class ProfileList { | 13 class ProfileList { |
14 public: | 14 public: |
15 virtual ~ProfileList() {} | 15 virtual ~ProfileList() {} |
16 | 16 |
17 static ProfileList* Create(ProfileInfoInterface* profile_cache); | 17 static ProfileList* Create(ProfileInfoInterface* profile_cache); |
18 | 18 |
19 // Returns the number of profiles in the model. | 19 // Returns the number of profiles in the model. |
20 virtual size_t GetNumberOfItems() const = 0; | 20 virtual size_t GetNumberOfItems() const = 0; |
21 | 21 |
22 // Returns the Item at the specified index. | 22 // Returns the Item at the specified index. |
23 virtual const AvatarMenu::Item& GetItemAt(size_t index) const = 0; | 23 virtual const AvatarMenu::Item& GetItemAt(size_t index) const = 0; |
24 | 24 |
| 25 // Returns the active Item. |
| 26 virtual const AvatarMenu::Item& GetActiveItem() const = 0; |
| 27 |
25 // Rebuilds the menu from the data source. | 28 // Rebuilds the menu from the data source. |
26 virtual void RebuildMenu() = 0; | 29 virtual void RebuildMenu() = 0; |
27 | 30 |
28 // Returns the index in the menu of the specified profile. | 31 // Returns the index in the menu of the specified profile. |
29 virtual size_t MenuIndexFromProfileIndex(size_t index) = 0; | 32 virtual size_t MenuIndexFromProfileIndex(size_t index) = 0; |
30 | 33 |
31 // Updates the path of the active browser's profile. | 34 // Updates the path of the active browser's profile. |
32 virtual void ActiveProfilePathChanged(base::FilePath& path) = 0; | 35 virtual void ActiveProfilePathChanged(base::FilePath& path) = 0; |
33 }; | 36 }; |
34 | 37 |
35 #endif // CHROME_BROWSER_PROFILES_PROFILE_LIST_H_ | 38 #endif // CHROME_BROWSER_PROFILES_PROFILE_LIST_H_ |
OLD | NEW |