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

Unified Diff: chrome/browser/extensions/extension_webstore_private_api.h

Issue 9414013: Add a webstore API for installing bundles of extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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/extension_webstore_private_api.h
diff --git a/chrome/browser/extensions/extension_webstore_private_api.h b/chrome/browser/extensions/extension_webstore_private_api.h
index efb6413c97f367e5d33a93e95f41c7520f473c6d..d3fac55aacaf84ba3e2cab830960342c51b6b30c 100644
--- a/chrome/browser/extensions/extension_webstore_private_api.h
+++ b/chrome/browser/extensions/extension_webstore_private_api.h
@@ -8,6 +8,7 @@
#include <string>
+#include "chrome/browser/extensions/api/webstore/bundle_installer.h"
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/webstore_install_helper.h"
@@ -34,6 +35,29 @@ class WebstorePrivateApi {
static void SetTrustTestIDsForTesting(bool allow);
};
+class InstallBundleFunction : public AsyncExtensionFunction,
+ public webstore::BundleInstaller::Delegate {
+ public:
+ InstallBundleFunction();
+
+ // BundleInstaller::Delegate implementation.
+ virtual void OnBundleInstallApproved() OVERRIDE;
+ virtual void OnBundleInstallCanceled(bool user_initiated) OVERRIDE;
+ virtual void OnBundleInstallCompleted() OVERRIDE;
+
+ protected:
+ virtual ~InstallBundleFunction();
+ virtual bool RunImpl() OVERRIDE;
+
+ // Reads the extension |details| into |items|.
+ bool ReadBundleInfo(base::ListValue* details,
+ webstore::ItemList* items);
+
+ private:
+ scoped_refptr<webstore::BundleInstaller> bundle_;
+ DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.installBundle");
+};
+
class BeginInstallWithManifestFunction
: public AsyncExtensionFunction,
public ExtensionInstallUI::Delegate,

Powered by Google App Engine
This is Rietveld 408576698