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_ | |
6 #define CHROME_BROWSER_UI_APP_LIST_SERVICE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/basictypes.h" | |
11 | |
12 class Profile; | |
13 class PrefRegistrySimple; | |
14 class Profile; | |
15 | |
16 namespace base { | |
17 class FilePath; | |
18 } | |
19 | |
20 namespace gfx { | |
21 class ImageSkia; | |
22 } | |
23 | |
24 class AppListService { | |
25 public: | |
26 static AppListService* Get(); | |
benwells
2013/02/11 04:12:32
So this would become GetForLastActiveDesktop at so
tapted
2013/02/11 05:35:11
yep!
| |
27 static AppListService* GetDisabled(); | |
benwells
2013/02/11 04:12:32
What is GetDisabled for? Unless it's obvious and I
tapted
2013/02/11 05:35:11
It's the Singleton for AppListService(). i.e. the
benwells
2013/02/11 05:52:36
I think we should organize the code so it isn't on
tapted
2013/02/18 07:05:39
Done.
| |
28 | |
29 static base::FilePath GetAppListProfilePath( | |
30 const base::FilePath& user_data_dir); | |
31 | |
32 static void RegisterAppListPrefs(PrefRegistrySimple* registry); | |
33 | |
34 // Do any once off initialization needed for the app list. | |
35 virtual void Init(Profile* initial_profile); | |
36 | |
37 // Show the app list. | |
38 virtual void ShowAppList(Profile* profile); | |
tapted
2013/02/11 04:04:20
probably just 'Show()' is fine, same for all the o
benwells
2013/02/11 05:52:36
sgtm
tapted
2013/02/19 03:15:32
I've changed my mind about this... since the usage
| |
39 | |
40 // Change the profile that the app list is showing. | |
41 virtual void SetAppListProfile(const base::FilePath& profile_file_path); | |
42 | |
43 // Dismiss the app list. | |
44 virtual void DismissAppList(); | |
benwells
2013/02/11 04:12:32
Can we move the test only stuff into private, and
tapted
2013/02/11 05:35:11
"maybe"? Maintaing friends could get fiddly/fragil
benwells
2013/02/11 05:52:36
Maybe if we just keep all the testing only functio
tapted
2013/02/19 03:15:32
IsAppListVisible now finds itself in non-test code
| |
45 | |
46 // Get the profile the app list is currently showing. | |
47 virtual Profile* GetCurrentAppListProfile(); | |
48 | |
49 // Returns true if the app list is visible. | |
50 virtual bool IsAppListVisible(); | |
51 | |
52 // Notify the app list that an extension has started downloading. | |
53 virtual void NotifyAppListOfBeginExtensionInstall( | |
54 Profile* profile, | |
55 const std::string& extension_id, | |
56 const std::string& extension_name, | |
57 const gfx::ImageSkia& installing_icon); | |
58 | |
59 virtual void NotifyAppListOfDownloadProgress( | |
60 Profile* profile, | |
61 const std::string& extension_id, | |
62 int percent_downloaded); | |
63 | |
64 protected: | |
65 AppListService() {} | |
66 virtual ~AppListService() {} | |
67 | |
68 private: | |
69 DISALLOW_COPY_AND_ASSIGN(AppListService); | |
70 }; | |
71 | |
72 #endif // CHROME_BROWSER_UI_APP_LIST_SERVICE_H_ | |
OLD | NEW |