Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / profiles / profile_list_chromeos.h
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_
6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_
7
8 #include "chrome/browser/profiles/profile_list.h"
9
10 #include <vector>
11
12 class ProfileInfoInterface;
13
14 namespace chromeos {
15
16 // This model represents profiles corresponding to logged-in ChromeOS users.
17 class ProfileListChromeOS : public ProfileList {
18  public:
19   explicit ProfileListChromeOS(ProfileInfoInterface* profile_cache);
20   virtual ~ProfileListChromeOS();
21
22   // ProfileList overrides:
23   virtual size_t GetNumberOfItems() const override;
24   virtual const AvatarMenu::Item& GetItemAt(size_t index) const override;
25   virtual void RebuildMenu() override;
26   virtual size_t MenuIndexFromProfileIndex(size_t index) override;
27   virtual void ActiveProfilePathChanged(base::FilePath& path) override;
28
29  private:
30   void ClearMenu();
31   void SortMenu();
32
33   // The cache that provides the profile information. Weak.
34   ProfileInfoInterface* profile_info_;
35
36   // The path of the currently active profile.
37   base::FilePath active_profile_path_;
38
39   // List of built "menu items."
40   std::vector<AvatarMenu::Item*> items_;
41
42   DISALLOW_COPY_AND_ASSIGN(ProfileListChromeOS);
43 };
44
45 }  // namespace chromeos
46
47 #endif  // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_LIST_CHROMEOS_H_