| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_CONTROLLER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/common/extensions/extension_constants.h" | 10 #include "chrome/common/extensions/extension_constants.h" |
| 11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 | 12 |
| 13 class Profile; | 13 class Profile; |
| 14 | 14 |
| 15 namespace base { | 15 namespace base { |
| 16 class FilePath; | 16 class FilePath; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace extensions { | 19 namespace extensions { |
| 20 class Extension; | 20 class Extension; |
| 21 class ExtensionSet; | 21 class ExtensionSet; |
| 22 class InstallTracker; | 22 class InstallTracker; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace gfx { | 25 namespace gfx { |
| 26 class ImageSkia; | 26 class ImageSkia; |
| 27 class Rect; |
| 27 } | 28 } |
| 28 | 29 |
| 29 // Interface to allow the view delegate to call out to whatever is controlling | 30 // Interface to allow the view delegate to call out to whatever is controlling |
| 30 // the app list. This will have different implementations for different | 31 // the app list. This will have different implementations for different |
| 31 // platforms. | 32 // platforms. |
| 32 class AppListControllerDelegate { | 33 class AppListControllerDelegate { |
| 33 public: | 34 public: |
| 34 // Indicates the source of an app list activation, for tracking purposes. | 35 // Indicates the source of an app list activation, for tracking purposes. |
| 35 enum AppListSource { | 36 enum AppListSource { |
| 36 LAUNCH_FROM_UNKNOWN, | 37 LAUNCH_FROM_UNKNOWN, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 53 | 54 |
| 54 // Dismisses the view. | 55 // Dismisses the view. |
| 55 virtual void DismissView() = 0; | 56 virtual void DismissView() = 0; |
| 56 | 57 |
| 57 // Handle the view being closed. | 58 // Handle the view being closed. |
| 58 virtual void ViewClosing(); | 59 virtual void ViewClosing(); |
| 59 | 60 |
| 60 // Get app list window. | 61 // Get app list window. |
| 61 virtual gfx::NativeWindow GetAppListWindow() = 0; | 62 virtual gfx::NativeWindow GetAppListWindow() = 0; |
| 62 | 63 |
| 64 // Get the content bounds of the app list in the screen. On platforms that |
| 65 // use views, this returns the bounds of the AppListView. Without views, this |
| 66 // returns a 0x0 rectangle. |
| 67 virtual gfx::Rect GetAppListBounds() = 0; |
| 68 |
| 63 // Get the application icon to be used, if any, for the app list. | 69 // Get the application icon to be used, if any, for the app list. |
| 64 virtual gfx::ImageSkia GetWindowIcon() = 0; | 70 virtual gfx::ImageSkia GetWindowIcon() = 0; |
| 65 | 71 |
| 66 // Control of pinning apps. | 72 // Control of pinning apps. |
| 67 virtual bool IsAppPinned(const std::string& extension_id) = 0; | 73 virtual bool IsAppPinned(const std::string& extension_id) = 0; |
| 68 virtual void PinApp(const std::string& extension_id) = 0; | 74 virtual void PinApp(const std::string& extension_id) = 0; |
| 69 virtual void UnpinApp(const std::string& extension_id) = 0; | 75 virtual void UnpinApp(const std::string& extension_id) = 0; |
| 70 virtual Pinnable GetPinnable() = 0; | 76 virtual Pinnable GetPinnable() = 0; |
| 71 | 77 |
| 72 // Be aware of the extension prompt (either uninstalling flow or enable flow). | 78 // Be aware of the extension prompt (either uninstalling flow or enable flow). |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 extensions::InstallTracker* GetInstallTrackerFor(Profile* profile); | 157 extensions::InstallTracker* GetInstallTrackerFor(Profile* profile); |
| 152 | 158 |
| 153 // Get the list of installed apps for the given profile. | 159 // Get the list of installed apps for the given profile. |
| 154 void GetApps(Profile* profile, extensions::ExtensionSet* out_apps); | 160 void GetApps(Profile* profile, extensions::ExtensionSet* out_apps); |
| 155 | 161 |
| 156 // Called when a search is started using the app list search box. | 162 // Called when a search is started using the app list search box. |
| 157 void OnSearchStarted(); | 163 void OnSearchStarted(); |
| 158 }; | 164 }; |
| 159 | 165 |
| 160 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_ | 166 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_H_ |
| OLD | NEW |