| Index: chrome/browser/extensions/api/webstore_private/webstore_private_api.h
|
| diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
|
| index b6afde938d1396bfe211ef049f8aee83e5a87205..abab6b0ac69ecd6c51d7e84b08c4c9faee3df496 100644
|
| --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
|
| +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
|
| @@ -8,6 +8,7 @@
|
| #include <string>
|
|
|
| #include "chrome/browser/extensions/active_install_data.h"
|
| +#include "chrome/browser/extensions/bundle_installer.h"
|
| #include "chrome/browser/extensions/chrome_extension_function_details.h"
|
| #include "chrome/browser/extensions/extension_install_prompt.h"
|
| #include "chrome/browser/extensions/webstore_install_helper.h"
|
| @@ -18,6 +19,7 @@
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
|
|
| class GPUFeatureChecker;
|
| +class SafeImageFetcher;
|
|
|
| namespace extensions {
|
|
|
| @@ -182,6 +184,34 @@ class WebstorePrivateShowPermissionPromptForDelegatedInstallFunction
|
| api::webstore_private::Result result) const override;
|
| };
|
|
|
| +class WebstorePrivateInstallBundleFunction : public UIThreadExtensionFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION("webstorePrivate.installBundle",
|
| + WEBSTOREPRIVATE_INSTALLBUNDLE)
|
| +
|
| + WebstorePrivateInstallBundleFunction();
|
| +
|
| + private:
|
| + ~WebstorePrivateInstallBundleFunction() override;
|
| +
|
| + // ExtensionFunction:
|
| + ExtensionFunction::ResponseAction Run() override;
|
| +
|
| + void OnIconFetched(const SkBitmap& icon);
|
| +
|
| + void OnInstallApproval(BundleInstaller::ApprovalState state);
|
| + void OnInstallComplete();
|
| +
|
| + ChromeExtensionFunctionDetails chrome_details_;
|
| +
|
| + // This stores the input parameters to the function.
|
| + scoped_ptr<api::webstore_private::InstallBundle::Params> params_;
|
| +
|
| + scoped_ptr<extensions::BundleInstaller> bundle_;
|
| +
|
| + scoped_ptr<SafeImageFetcher> icon_fetcher_;
|
| +};
|
| +
|
| class WebstorePrivateEnableAppLauncherFunction
|
| : public UIThreadExtensionFunction {
|
| public:
|
|
|