OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_INFO_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ |
7 | 7 |
8 #include "base/file_path.h" | 8 #include <vector> |
9 #include "base/string16.h" | |
10 | 9 |
11 namespace gfx { | 10 class FilePath; |
12 class Image; | 11 class ProfileInfoEntry; |
13 } | |
14 | 12 |
15 // This abstract interface is used to query the profiles backend for information | 13 // This abstract interface is used to query the profiles backend for information |
16 // about the different profiles. Its sole concrete implementation is the | 14 // about the different profiles. Its sole concrete implementation is the |
17 // ProfileInfoCache. This interface exists largely to assist in testing. | 15 // ProfileInfoCache. This interface exists largely to assist in testing. |
18 class ProfileInfoInterface { | 16 class ProfileInfoInterface { |
19 public: | 17 public: |
20 virtual size_t GetNumberOfProfiles() const = 0; | 18 virtual size_t GetNumberOfProfiles() const = 0; |
21 | 19 |
22 virtual size_t GetIndexOfProfileWithPath( | 20 virtual std::vector<ProfileInfoEntry> GetProfilesSortedByName() const = 0; |
23 const FilePath& profile_path) const = 0; | |
24 | 21 |
25 virtual string16 GetNameOfProfileAtIndex(size_t index) const = 0; | 22 virtual bool GetInfoForProfile(const FilePath& path, |
26 | 23 ProfileInfoEntry* entry) const = 0; |
27 virtual FilePath GetPathOfProfileAtIndex(size_t index) const = 0; | |
28 | |
29 virtual string16 GetUserNameOfProfileAtIndex(size_t index) const = 0; | |
30 | |
31 virtual const gfx::Image& GetAvatarIconOfProfileAtIndex( | |
32 size_t index) const = 0; | |
33 | |
34 // Returns true if the profile at the given index is currently running any | |
35 // background apps. | |
36 virtual bool GetBackgroundStatusOfProfileAtIndex( | |
37 size_t index) const = 0; | |
38 | 24 |
39 protected: | 25 protected: |
40 virtual ~ProfileInfoInterface() {} | 26 virtual ~ProfileInfoInterface() {} |
41 }; | 27 }; |
42 | 28 |
43 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ | 29 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ |
OLD | NEW |