Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: chrome/browser/ui/app_list/app_list_service.h

Issue 12207104: Refactor app_list_util.h into AppListService abstract base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase (conflicts in webstore_private_api.cc) Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_APP_LIST_SERVICE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_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;
tfarina 2013/02/21 22:59:09 sort
tapted 2013/02/25 07:09:21 Done.
15 class Profile;
tfarina 2013/02/21 22:59:09 duplicated
tapted 2013/02/25 07:09:21 Done.
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();
tfarina 2013/02/21 22:59:09 GetInstance?
tapted 2013/02/25 07:09:21 AppListService isn't a singleton at this level. An
29
30 // Call Init for all AppListService instances on this platform.
31 static void InitAll(Profile* initial_profile);
32
33 static base::FilePath GetAppListProfilePath(
34 const base::FilePath& user_data_dir);
35
36 static void RegisterPrefs(PrefRegistrySimple* registry);
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(const base::FilePath& profile_file_path);
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() const;
51
52 virtual void OnBeginExtensionInstall(Profile* profile,
53 const std::string& extension_id,
54 const std::string& extension_name,
55 const gfx::ImageSkia& installing_icon);
56
57 virtual void OnDownloadProgress(Profile* profile,
58 const std::string& extension_id,
59 int percent_downloaded);
60
61 virtual void OnExtensionInstallFailure(Profile* profile,
62 const std::string& extension_id);
63
64 // ProfileInfoCacheObserver overrides:
65 virtual void OnProfileAdded(const base::FilePath& profilePath) OVERRIDE;
tfarina 2013/02/21 22:59:09 Can you make those private?
tapted 2013/02/25 07:09:21 These could potentially still be overridden by a l
66 virtual void OnProfileWillBeRemoved(
67 const base::FilePath& profile_path) OVERRIDE;
68 virtual void OnProfileWasRemoved(const base::FilePath& profile_path,
69 const string16& profile_name) OVERRIDE;
tfarina 2013/02/21 22:59:09 add compiler_specific.h for OVERRIDE
tapted 2013/02/25 07:09:21 Done.
70 virtual void OnProfileNameChanged(const base::FilePath& profile_path,
71 const string16& profile_name) OVERRIDE;
72 virtual void OnProfileAvatarChanged(
73 const base::FilePath& profile_path) OVERRIDE;
74
75 protected:
76 AppListService() {}
77 virtual ~AppListService() {}
78
79 // Do any once off initialization needed for the app list.
80 virtual void Init(Profile* initial_profile);
81
82 private:
83 DISALLOW_COPY_AND_ASSIGN(AppListService);
84 };
85
86 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698