Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 // Get the AppListService for the current platform and desktop type. | 29 // Get the AppListService for the current platform and desktop type. |
| 30 static AppListService* Get(); | 30 static AppListService* Get(); |
| 31 | 31 |
| 32 // Call Init for all AppListService instances on this platform. | 32 // Call Init for all AppListService instances on this platform. |
| 33 static void InitAll(Profile* initial_profile); | 33 static void InitAll(Profile* initial_profile); |
| 34 | 34 |
| 35 static void RegisterPrefs(PrefRegistrySimple* registry); | 35 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 36 | 36 |
| 37 virtual base::FilePath GetProfilePath( | 37 virtual base::FilePath GetProfilePath( |
| 38 const base::FilePath& user_data_dir) = 0; | 38 const base::FilePath& user_data_dir) = 0; |
| 39 virtual void SetProfilePath(const base::FilePath& profile_path) = 0; | |
| 39 | 40 |
| 40 static void RecordShowTimings(const CommandLine& command_line); | 41 static void RecordShowTimings(const CommandLine& command_line); |
| 41 | 42 |
| 42 // Show the app list. | 43 // Show the app list. |
| 43 virtual void ShowAppList(Profile* requested_profile) = 0; | 44 virtual void ShowAppList(Profile* requested_profile) = 0; |
| 44 | 45 |
| 45 // Dismiss the app list. | 46 // Dismiss the app list. |
| 46 virtual void DismissAppList() = 0; | 47 virtual void DismissAppList() = 0; |
| 47 | 48 |
| 48 // TODO(koz): Merge this into ShowAppList(). | |
|
benwells
2013/07/12 01:41:48
I think this renaming is a cleanup and not necessa
tapted
2013/07/12 04:58:27
The 2-3 parts of this function were (a) set the lo
| |
| 49 virtual void SetAppListProfile(const base::FilePath& profile_file_path) = 0; | |
| 50 | |
| 51 // Show the app list for the profile configured in the user data dir for the | 49 // Show the app list for the profile configured in the user data dir for the |
| 52 // current browser process. | 50 // current browser process. |
| 53 virtual void ShowForSavedProfile() = 0; | 51 virtual void ShowForSavedProfile() = 0; |
| 54 | 52 |
| 55 // Get the profile the app list is currently showing. | 53 // Get the profile the app list is currently showing. |
| 56 virtual Profile* GetCurrentAppListProfile() = 0; | 54 virtual Profile* GetCurrentAppListProfile() = 0; |
| 57 | 55 |
| 58 // Returns true if the app list is visible. | 56 // Returns true if the app list is visible. |
| 59 virtual bool IsAppListVisible() const = 0; | 57 virtual bool IsAppListVisible() const = 0; |
| 60 | 58 |
| 61 // Enable the app list. What this does specifically will depend on the host | 59 // Enable the app list. What this does specifically will depend on the host |
| 62 // operating system and shell. | 60 // operating system and shell. |
| 63 virtual void EnableAppList() = 0; | 61 virtual void EnableAppList(Profile* initial_profile) = 0; |
| 64 | 62 |
| 65 // Get the window the app list is in, or NULL if the app list isn't visible. | 63 // Get the window the app list is in, or NULL if the app list isn't visible. |
| 66 virtual gfx::NativeWindow GetAppListWindow() = 0; | 64 virtual gfx::NativeWindow GetAppListWindow() = 0; |
| 67 | 65 |
| 68 // Exposed to allow testing of the controller delegate. | 66 // Exposed to allow testing of the controller delegate. |
| 69 virtual AppListControllerDelegate* CreateControllerDelegate() = 0; | 67 virtual AppListControllerDelegate* CreateControllerDelegate() = 0; |
| 70 | 68 |
| 71 protected: | 69 protected: |
| 72 AppListService() {} | 70 AppListService() {} |
| 73 virtual ~AppListService() {} | 71 virtual ~AppListService() {} |
| 74 | 72 |
| 75 // Do any once off initialization needed for the app list. | 73 // Do any once off initialization needed for the app list. |
| 76 virtual void Init(Profile* initial_profile) = 0; | 74 virtual void Init(Profile* initial_profile) = 0; |
| 77 | 75 |
| 78 private: | 76 private: |
| 79 DISALLOW_COPY_AND_ASSIGN(AppListService); | 77 DISALLOW_COPY_AND_ASSIGN(AppListService); |
| 80 }; | 78 }; |
| 81 | 79 |
| 82 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ | 80 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ |
| OLD | NEW |