| 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_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_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 ProfileInfoInterface; | 12 class ProfileInfoInterface; |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 | 15 |
| 16 // This model represents profiles corresponding to logged-in ChromeOS users. | 16 // This model represents profiles corresponding to logged-in ChromeOS users. |
| 17 class ProfileListChromeOS : public ProfileList { | 17 class ProfileListChromeOS : public ProfileList { |
| 18 public: | 18 public: |
| 19 explicit ProfileListChromeOS(ProfileInfoInterface* profile_cache); | 19 explicit ProfileListChromeOS(ProfileInfoInterface* profile_cache); |
| 20 virtual ~ProfileListChromeOS(); | 20 virtual ~ProfileListChromeOS(); |
| 21 | 21 |
| 22 // ProfileList overrides: | 22 // ProfileList overrides: |
| 23 virtual size_t GetNumberOfItems() const OVERRIDE; | 23 virtual size_t GetNumberOfItems() const override; |
| 24 virtual const AvatarMenu::Item& GetItemAt(size_t index) const OVERRIDE; | 24 virtual const AvatarMenu::Item& GetItemAt(size_t index) const override; |
| 25 virtual void RebuildMenu() OVERRIDE; | 25 virtual void RebuildMenu() override; |
| 26 virtual size_t MenuIndexFromProfileIndex(size_t index) OVERRIDE; | 26 virtual size_t MenuIndexFromProfileIndex(size_t index) override; |
| 27 virtual void ActiveProfilePathChanged(base::FilePath& path) OVERRIDE; | 27 virtual void ActiveProfilePathChanged(base::FilePath& path) override; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 void ClearMenu(); | 30 void ClearMenu(); |
| 31 void SortMenu(); | 31 void SortMenu(); |
| 32 | 32 |
| 33 // The cache that provides the profile information. Weak. | 33 // The cache that provides the profile information. Weak. |
| 34 ProfileInfoInterface* profile_info_; | 34 ProfileInfoInterface* profile_info_; |
| 35 | 35 |
| 36 // The path of the currently active profile. | 36 // The path of the currently active profile. |
| 37 base::FilePath active_profile_path_; | 37 base::FilePath active_profile_path_; |
| 38 | 38 |
| 39 // List of built "menu items." | 39 // List of built "menu items." |
| 40 std::vector<AvatarMenu::Item*> items_; | 40 std::vector<AvatarMenu::Item*> items_; |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(ProfileListChromeOS); | 42 DISALLOW_COPY_AND_ASSIGN(ProfileListChromeOS); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace chromeos | 45 } // namespace chromeos |
| 46 | 46 |
| 47 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_ | 47 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_ |
| OLD | NEW |