Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3077)

Unified Diff: chrome/browser/extensions/api/webstore_private/webstore_private_api.h

Issue 855513002: Add/resurrect support for bundles of WebStore items. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testext_bundle
Patch Set: fix BitmapFetcher destruction Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..a6b83b18f37b630dc53e629c6f1c171597b16f06 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
@@ -7,7 +7,9 @@
#include <string>
+#include "chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h"
#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"
@@ -19,6 +21,10 @@
class GPUFeatureChecker;
+namespace chrome {
+class BitmapFetcher;
+} // namespace chrome
+
namespace extensions {
class WebstorePrivateApi {
@@ -182,6 +188,37 @@ class WebstorePrivateShowPermissionPromptForDelegatedInstallFunction
api::webstore_private::Result result) const override;
};
+class WebstorePrivateInstallBundleFunction
+ : public UIThreadExtensionFunction,
+ public chrome::BitmapFetcherDelegate {
+ public:
+ DECLARE_EXTENSION_FUNCTION("webstorePrivate.installBundle",
+ WEBSTOREPRIVATE_INSTALLBUNDLE)
+
+ WebstorePrivateInstallBundleFunction();
+
+ private:
+ ~WebstorePrivateInstallBundleFunction() override;
+
+ // ExtensionFunction:
+ ExtensionFunction::ResponseAction Run() override;
+
+ // chrome::BitmapFetcherDelegate:
+ void OnFetchComplete(const GURL& url, const SkBitmap* bitmap) override;
+
+ 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<chrome::BitmapFetcher> icon_fetcher_;
+};
+
class WebstorePrivateEnableAppLauncherFunction
: public UIThreadExtensionFunction {
public:
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/api/webstore_private/webstore_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698