Chromium Code Reviews| Index: chrome/browser/extensions/api/management/management_api.h |
| =================================================================== |
| --- chrome/browser/extensions/api/management/management_api.h (revision 271412) |
| +++ chrome/browser/extensions/api/management/management_api.h (working copy) |
| @@ -6,9 +6,12 @@ |
| #define CHROME_BROWSER_EXTENSIONS_API_MANAGEMENT_MANAGEMENT_API_H_ |
| #include "base/compiler_specific.h" |
| +#include "base/task/cancelable_task_tracker.h" |
| +#include "chrome/browser/extensions/bookmark_app_helper.h" |
| #include "chrome/browser/extensions/chrome_extension_function.h" |
| #include "chrome/browser/extensions/extension_install_prompt.h" |
| #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
| +#include "components/favicon_base/favicon_types.h" |
| #include "components/keyed_service/core/keyed_service.h" |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| @@ -17,6 +20,7 @@ |
| class ExtensionService; |
| class ExtensionUninstallDialog; |
| +class WebApplicationInfo; |
| namespace extensions { |
| @@ -189,6 +193,40 @@ |
| virtual bool RunAsync() OVERRIDE; |
| }; |
| +class ManagementGenerateAppForLinkFunction : public AsyncManagementFunction { |
| + public: |
| + DECLARE_EXTENSION_FUNCTION("management.generateAppForLink", |
| + MANAGEMENT_GENERATEAPPFORLINK); |
| + |
| + ManagementGenerateAppForLinkFunction(); |
| + |
| + protected: |
| + virtual ~ManagementGenerateAppForLinkFunction(); |
| + |
| + virtual bool RunAsync() OVERRIDE; |
| + |
| + private: |
| + struct AppInstallInfo { |
|
benwells
2014/05/27 22:05:54
Why do you need this struct? Seems like having a t
wjywbs
2014/05/27 22:20:21
Done.
|
| + AppInstallInfo() {} |
| + ~AppInstallInfo() {} |
| + |
| + std::string title; |
| + GURL launch_url; |
| + }; |
| + |
| + void OnFaviconForApp(const favicon_base::FaviconImageResult& image_result); |
| + |
| + void FinishCreateBookmarkApp(const extensions::Extension* extension, |
| + const WebApplicationInfo& web_app_info); |
| + |
| + scoped_ptr<AppInstallInfo> install_info_; |
| + |
| + scoped_ptr<BookmarkAppHelper> bookmark_app_helper_; |
| + |
| + // Used for favicon loading tasks. |
| + base::CancelableTaskTracker cancelable_task_tracker_; |
| +}; |
| + |
| class ManagementEventRouter : public content::NotificationObserver { |
| public: |
| explicit ManagementEventRouter(Profile* profile); |