| 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 06436443a5092b233d0f766999e23e55e9ab4a6d..45f61134080cf8cb003cc810d82692b96f1e6331 100644
|
| --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
|
| +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
|
| @@ -120,6 +120,55 @@ class WebstorePrivateCompleteInstallFunction
|
| scoped_ptr<ScopedActiveInstall> scoped_active_install_;
|
| };
|
|
|
| +class WebstorePrivateShowPermissionPromptForDelegatedInstallFunction
|
| + : public UIThreadExtensionFunction,
|
| + public ExtensionInstallPrompt::Delegate,
|
| + public WebstoreInstallHelper::Delegate {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION(
|
| + "webstorePrivate.showPermissionPromptForDelegatedInstall",
|
| + WEBSTOREPRIVATE_SHOWPERMISSIONPROMPTFORDELEGATEDINSTALL)
|
| +
|
| + WebstorePrivateShowPermissionPromptForDelegatedInstallFunction();
|
| +
|
| + private:
|
| + ~WebstorePrivateShowPermissionPromptForDelegatedInstallFunction() override;
|
| +
|
| + // ExtensionFunction:
|
| + ExtensionFunction::ResponseAction Run() override;
|
| +
|
| + // WebstoreInstallHelper::Delegate:
|
| + void OnWebstoreParseSuccess(const std::string& id,
|
| + const SkBitmap& icon,
|
| + base::DictionaryValue* parsed_manifest) override;
|
| + void OnWebstoreParseFailure(const std::string& id,
|
| + InstallHelperResultCode result,
|
| + const std::string& error_message) override;
|
| +
|
| + // ExtensionInstallPrompt::Delegate:
|
| + void InstallUIProceed() override;
|
| + void InstallUIAbort(bool user_initiated) override;
|
| +
|
| + ExtensionFunction::ResponseValue BuildResponse(
|
| + api::webstore_private::Result result,
|
| + const std::string& error);
|
| +
|
| + // This stores the input parameters to the function.
|
| + scoped_ptr<api::webstore_private::ShowPermissionPromptForDelegatedInstall::
|
| + Params> params_;
|
| +
|
| + // The results of parsing manifest_ and icon_data_ go into these two.
|
| + scoped_ptr<base::DictionaryValue> parsed_manifest_;
|
| + SkBitmap icon_;
|
| +
|
| + // A dummy Extension object we create for the purposes of using
|
| + // ExtensionInstallPrompt to prompt for confirmation of the install.
|
| + scoped_refptr<Extension> dummy_extension_;
|
| +
|
| + // The class that displays the install prompt.
|
| + scoped_ptr<ExtensionInstallPrompt> install_prompt_;
|
| +};
|
| +
|
| class WebstorePrivateEnableAppLauncherFunction
|
| : public UIThreadExtensionFunction {
|
| public:
|
|
|