OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_DESKTOP_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_LIST_DESKTOP_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_LIST_DESKTOP_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_LIST_DESKTOP_H_ |
7 | 7 |
8 #include "chrome/browser/profiles/profile_list.h" | 8 #include "chrome/browser/profiles/profile_list.h" |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 class Browser; | 12 class Browser; |
13 class ProfileInfoInterface; | 13 class ProfileInfoInterface; |
14 | 14 |
15 // This model represents the profiles added to desktop Chrome. | 15 // This model represents the profiles added to desktop Chrome. |
16 class ProfileListDesktop : public ProfileList { | 16 class ProfileListDesktop : public ProfileList { |
17 public: | 17 public: |
18 explicit ProfileListDesktop(ProfileInfoInterface* profile_cache); | 18 explicit ProfileListDesktop(ProfileInfoInterface* profile_cache); |
19 virtual ~ProfileListDesktop(); | 19 virtual ~ProfileListDesktop(); |
20 | 20 |
21 // ProfileList overrides: | 21 // ProfileList overrides: |
22 virtual size_t GetNumberOfItems() const OVERRIDE; | 22 virtual size_t GetNumberOfItems() const OVERRIDE; |
23 virtual const AvatarMenu::Item& GetItemAt(size_t index) const OVERRIDE; | 23 virtual const AvatarMenu::Item& GetItemAt(size_t index) const OVERRIDE; |
| 24 virtual const AvatarMenu::Item& GetActiveItem() const OVERRIDE; |
24 virtual void RebuildMenu() OVERRIDE; | 25 virtual void RebuildMenu() OVERRIDE; |
25 virtual size_t MenuIndexFromProfileIndex(size_t index) OVERRIDE; | 26 virtual size_t MenuIndexFromProfileIndex(size_t index) OVERRIDE; |
26 virtual void ActiveProfilePathChanged(base::FilePath& path) OVERRIDE; | 27 virtual void ActiveProfilePathChanged(base::FilePath& path) OVERRIDE; |
27 | 28 |
28 private: | 29 private: |
29 void ClearMenu(); | 30 void ClearMenu(); |
30 | 31 |
31 // The cache that provides the profile information. Weak. | 32 // The cache that provides the profile information. Weak. |
32 ProfileInfoInterface* profile_info_; | 33 ProfileInfoInterface* profile_info_; |
33 | 34 |
34 // The path of the currently active profile. | 35 // The path of the currently active profile. |
35 base::FilePath active_profile_path_; | 36 base::FilePath active_profile_path_; |
36 | 37 |
37 // List of built "menu items." | 38 // List of built "menu items." |
38 std::vector<AvatarMenu::Item*> items_; | 39 std::vector<AvatarMenu::Item*> items_; |
39 | 40 |
40 DISALLOW_COPY_AND_ASSIGN(ProfileListDesktop); | 41 DISALLOW_COPY_AND_ASSIGN(ProfileListDesktop); |
41 }; | 42 }; |
42 | 43 |
43 #endif // CHROME_BROWSER_PROFILES_PROFILE_LIST_DESKTOP_H_ | 44 #endif // CHROME_BROWSER_PROFILES_PROFILE_LIST_DESKTOP_H_ |
OLD | NEW |