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

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 0c1f09dbb3a53a384f8a9b9d35d789b29da9290c..61085eff5cea40c4b5b2f5132d824d29eb10a5f8 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/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"
@@ -38,6 +39,29 @@ class WebstorePrivateApi {
static void SetTrustTestIDsForTesting(bool allow);
};
+class InstallBundleFunction : public AsyncExtensionFunction,
+ public extensions::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,
+ extensions::BundleInstaller::ItemList* items);
+
+ private:
+ scoped_refptr<extensions::BundleInstaller> bundle_;
+ DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.installBundle");
+};
+
class BeginInstallWithManifestFunction
: public AsyncExtensionFunction,
public ExtensionInstallUI::Delegate,

Powered by Google App Engine
This is Rietveld 408576698