OLD | NEW |
---|---|
(Empty) | |
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_UI_APP_LIST_SERVICE_H_ | |
benwells
2013/02/18 08:31:30
Why is this not in c/b/ui/app_list?
tapted
2013/02/18 10:27:55
The app_list folder is bound to ENABLE_APP_LIST -
tapted
2013/02/19 03:15:32
Done (I think... need to launch some builders).
| |
6 #define CHROME_BROWSER_UI_APP_LIST_SERVICE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "chrome/browser/profiles/profile_info_cache_observer.h" | |
12 | |
13 class Profile; | |
14 class PrefRegistrySimple; | |
15 class Profile; | |
16 | |
17 namespace base { | |
18 class FilePath; | |
19 } | |
20 | |
21 namespace gfx { | |
22 class ImageSkia; | |
23 } | |
24 | |
25 class AppListService : public ProfileInfoCacheObserver { | |
26 public: | |
27 // Get the AppListService for the current platform and desktop type. | |
28 static AppListService* Get(); | |
29 | |
30 static base::FilePath GetAppListProfilePath( | |
31 const base::FilePath& user_data_dir); | |
32 | |
33 static void RegisterAppListPrefs(PrefRegistrySimple* registry); | |
34 | |
35 // Do any once off initialization needed for the app list. | |
36 virtual void Init(Profile* initial_profile); | |
37 | |
38 // Show the app list. | |
39 virtual void ShowAppList(Profile* profile); | |
40 | |
41 // Dismiss the app list. | |
42 virtual void DismissAppList(); | |
43 | |
44 virtual void SetAppListProfile( | |
45 const base::FilePath& profile_file_path); | |
46 | |
47 // Get the profile the app list is currently showing. | |
48 virtual Profile* GetCurrentAppListProfile(); | |
benwells
2013/02/18 08:31:30
Can we move things just for testing so they are to
tapted
2013/02/18 10:27:55
Shouldn't be an issue.
tapted
2013/02/19 03:15:32
\todo
| |
49 | |
50 // Returns true if the app list is visible. | |
51 virtual bool IsAppListVisible() const; | |
52 | |
53 virtual void OnBeginExtensionInstall(Profile* profile, | |
54 const std::string& extension_id, | |
55 const std::string& extension_name, | |
56 const gfx::ImageSkia& installing_icon); | |
57 | |
58 virtual void OnDownloadProgress(Profile* profile, | |
59 const std::string& extension_id, | |
60 int percent_downloaded); | |
61 | |
62 virtual void OnExtensionInstallFailure(Profile* profile, | |
63 const std::string& extension_id); | |
64 | |
65 // ProfileInfoCacheObserver overrides: | |
66 virtual void OnProfileAdded(const base::FilePath& profilePath) OVERRIDE; | |
67 virtual void OnProfileWillBeRemoved( | |
68 const base::FilePath& profile_path) OVERRIDE; | |
69 virtual void OnProfileWasRemoved(const base::FilePath& profile_path, | |
70 const string16& profile_name) OVERRIDE; | |
71 virtual void OnProfileNameChanged(const base::FilePath& profile_path, | |
72 const string16& profile_name) OVERRIDE; | |
73 virtual void OnProfileAvatarChanged( | |
74 const base::FilePath& profile_path) OVERRIDE; | |
75 | |
76 protected: | |
77 AppListService() {} | |
78 virtual ~AppListService() {} | |
79 | |
80 private: | |
81 DISALLOW_COPY_AND_ASSIGN(AppListService); | |
82 }; | |
83 | |
84 #endif // CHROME_BROWSER_UI_APP_LIST_SERVICE_H_ | |
OLD | NEW |