Chromium Code Reviews| Index: chrome/browser/ui/app_list_service.h |
| diff --git a/chrome/browser/ui/app_list_service.h b/chrome/browser/ui/app_list_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0acd40693b17529832ae6ddfa03e342357e99fa0 |
| --- /dev/null |
| +++ b/chrome/browser/ui/app_list_service.h |
| @@ -0,0 +1,72 @@ |
| +// 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_SERVICE_H_ |
| +#define CHROME_BROWSER_UI_APP_LIST_SERVICE_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| + |
| +class Profile; |
| +class PrefRegistrySimple; |
| +class Profile; |
| + |
| +namespace base { |
| +class FilePath; |
| +} |
| + |
| +namespace gfx { |
| +class ImageSkia; |
| +} |
| + |
| +class AppListService { |
| + public: |
| + 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!
|
| + 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.
|
| + |
| + static base::FilePath GetAppListProfilePath( |
| + const base::FilePath& user_data_dir); |
| + |
| + static void RegisterAppListPrefs(PrefRegistrySimple* registry); |
| + |
| + // Do any once off initialization needed for the app list. |
| + virtual void Init(Profile* initial_profile); |
| + |
| + // Show the app list. |
| + 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
|
| + |
| + // Change the profile that the app list is showing. |
| + virtual void SetAppListProfile(const base::FilePath& profile_file_path); |
| + |
| + // Dismiss the app list. |
| + 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
|
| + |
| + // Get the profile the app list is currently showing. |
| + virtual Profile* GetCurrentAppListProfile(); |
| + |
| + // Returns true if the app list is visible. |
| + virtual bool IsAppListVisible(); |
| + |
| + // Notify the app list that an extension has started downloading. |
| + virtual void NotifyAppListOfBeginExtensionInstall( |
| + Profile* profile, |
| + const std::string& extension_id, |
| + const std::string& extension_name, |
| + const gfx::ImageSkia& installing_icon); |
| + |
| + virtual void NotifyAppListOfDownloadProgress( |
| + Profile* profile, |
| + const std::string& extension_id, |
| + int percent_downloaded); |
| + |
| + protected: |
| + AppListService() {} |
| + virtual ~AppListService() {} |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(AppListService); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_APP_LIST_SERVICE_H_ |