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, |