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