| 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" |
| 11 #include "base/callback_forward.h" |
| 11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
| 13 | 14 |
| 14 class AppListControllerDelegate; | 15 class AppListControllerDelegate; |
| 15 class CommandLine; | 16 class CommandLine; |
| 16 class PrefRegistrySimple; | 17 class PrefRegistrySimple; |
| 17 class Profile; | 18 class Profile; |
| 18 | 19 |
| 19 namespace base { | 20 namespace base { |
| 20 class FilePath; | 21 class FilePath; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace gfx { | 24 namespace gfx { |
| 24 class ImageSkia; | 25 class ImageSkia; |
| 25 } | 26 } |
| 26 | 27 |
| 27 class AppListService { | 28 class AppListService { |
| 28 public: | 29 public: |
| 29 // Get the AppListService for the current platform and desktop type. | 30 // Get the AppListService for the current platform and desktop type. |
| 30 static AppListService* Get(); | 31 static AppListService* Get(); |
| 31 | 32 |
| 32 // Call Init for all AppListService instances on this platform. | 33 // Call Init for all AppListService instances on this platform. |
| 33 static void InitAll(Profile* initial_profile); | 34 static void InitAll(Profile* initial_profile); |
| 34 | 35 |
| 35 static void RegisterPrefs(PrefRegistrySimple* registry); | 36 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 36 | 37 |
| 37 static void RecordShowTimings(const CommandLine& command_line); | 38 static void RecordShowTimings(const CommandLine& command_line); |
| 38 | 39 |
| 40 // Indicates that |callback| should be called next time the app list is |
| 41 // painted. |
| 42 virtual void SetAppListNextPaintCallback(const base::Closure& callback) = 0; |
| 43 |
| 39 // Perform Chrome first run logic. This is executed before Chrome's threads | 44 // Perform Chrome first run logic. This is executed before Chrome's threads |
| 40 // have been created. | 45 // have been created. |
| 41 virtual void HandleFirstRun() = 0; | 46 virtual void HandleFirstRun() = 0; |
| 42 | 47 |
| 43 virtual base::FilePath GetProfilePath( | 48 virtual base::FilePath GetProfilePath( |
| 44 const base::FilePath& user_data_dir) = 0; | 49 const base::FilePath& user_data_dir) = 0; |
| 45 virtual void SetProfilePath(const base::FilePath& profile_path) = 0; | 50 virtual void SetProfilePath(const base::FilePath& profile_path) = 0; |
| 46 | 51 |
| 47 // Show the app list for the profile configured in the user data dir for the | 52 // Show the app list for the profile configured in the user data dir for the |
| 48 // current browser process. | 53 // current browser process. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 virtual ~AppListService() {} | 85 virtual ~AppListService() {} |
| 81 | 86 |
| 82 // Do any once off initialization needed for the app list. | 87 // Do any once off initialization needed for the app list. |
| 83 virtual void Init(Profile* initial_profile) = 0; | 88 virtual void Init(Profile* initial_profile) = 0; |
| 84 | 89 |
| 85 private: | 90 private: |
| 86 DISALLOW_COPY_AND_ASSIGN(AppListService); | 91 DISALLOW_COPY_AND_ASSIGN(AppListService); |
| 87 }; | 92 }; |
| 88 | 93 |
| 89 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ | 94 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_H_ |
| OLD | NEW |