Chromium Code Reviews| Index: chrome/browser/ui/app_list/app_list_service.h |
| diff --git a/chrome/browser/ui/app_list/app_list_service.h b/chrome/browser/ui/app_list/app_list_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..39a9e0be799f0e5beb15bc876339fcad15c4a514 |
| --- /dev/null |
| +++ b/chrome/browser/ui/app_list/app_list_service.h |
| @@ -0,0 +1,86 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ |
| +#define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| +#include "chrome/browser/profiles/profile_info_cache_observer.h" |
| + |
| +class Profile; |
| +class PrefRegistrySimple; |
|
tfarina
2013/02/21 22:59:09
sort
tapted
2013/02/25 07:09:21
Done.
|
| +class Profile; |
|
tfarina
2013/02/21 22:59:09
duplicated
tapted
2013/02/25 07:09:21
Done.
|
| + |
| +namespace base { |
| +class FilePath; |
| +} |
| + |
| +namespace gfx { |
| +class ImageSkia; |
| +} |
| + |
| +class AppListService : public ProfileInfoCacheObserver { |
| + public: |
| + // Get the AppListService for the current platform and desktop type. |
| + 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
|
| + |
| + // Call Init for all AppListService instances on this platform. |
| + static void InitAll(Profile* initial_profile); |
| + |
| + static base::FilePath GetAppListProfilePath( |
| + const base::FilePath& user_data_dir); |
| + |
| + static void RegisterPrefs(PrefRegistrySimple* registry); |
| + |
| + // Show the app list. |
| + virtual void ShowAppList(Profile* profile); |
| + |
| + // Dismiss the app list. |
| + virtual void DismissAppList(); |
| + |
| + virtual void SetAppListProfile(const base::FilePath& profile_file_path); |
| + |
| + // Get the profile the app list is currently showing. |
| + virtual Profile* GetCurrentAppListProfile(); |
| + |
| + // Returns true if the app list is visible. |
| + virtual bool IsAppListVisible() const; |
| + |
| + virtual void OnBeginExtensionInstall(Profile* profile, |
| + const std::string& extension_id, |
| + const std::string& extension_name, |
| + const gfx::ImageSkia& installing_icon); |
| + |
| + virtual void OnDownloadProgress(Profile* profile, |
| + const std::string& extension_id, |
| + int percent_downloaded); |
| + |
| + virtual void OnExtensionInstallFailure(Profile* profile, |
| + const std::string& extension_id); |
| + |
| + // ProfileInfoCacheObserver overrides: |
| + 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
|
| + virtual void OnProfileWillBeRemoved( |
| + const base::FilePath& profile_path) OVERRIDE; |
| + virtual void OnProfileWasRemoved(const base::FilePath& profile_path, |
| + 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.
|
| + virtual void OnProfileNameChanged(const base::FilePath& profile_path, |
| + const string16& profile_name) OVERRIDE; |
| + virtual void OnProfileAvatarChanged( |
| + const base::FilePath& profile_path) OVERRIDE; |
| + |
| + protected: |
| + AppListService() {} |
| + virtual ~AppListService() {} |
| + |
| + // Do any once off initialization needed for the app list. |
| + virtual void Init(Profile* initial_profile); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(AppListService); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ |