#include <string>
+#include "chrome/browser/extensions/active_install_data.h"
#include "chrome/browser/extensions/bundle_installer.h"
#include "chrome/browser/extensions/chrome_extension_function.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/webstore_installer.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/common/extensions/api/webstore_private.h"
+#include "chrome/common/extensions/webstore_install_result.h"
#include "components/signin/core/browser/signin_tracker.h"
#include "content/public/browser/gpu_data_manager_observer.h"
#include "content/public/browser/notification_observer.h"
scoped_ptr<SigninTracker> signin_tracker_;
+ scoped_ptr<ScopedActiveInstall> scoped_active_install_;
+
// The authuser query parameter value which should be used with CRX download
// requests. This is empty if authuser should not be set on download requests.
std::string authuser_;
private:
scoped_ptr<WebstoreInstaller::Approval> approval_;
+ scoped_ptr<ScopedActiveInstall> scoped_active_install_;
void OnInstallSuccess(const std::string& id);
};
scoped_ptr<SigninTracker> signin_tracker_;
};
+class WebstorePrivateLaunchEphemeralAppFunction
+ : public ChromeAsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("webstorePrivate.launchEphemeralApp",
+ WEBSTOREPRIVATE_LAUNCHEPHEMERALAPP)
+
+ WebstorePrivateLaunchEphemeralAppFunction();
+
+ protected:
+ virtual ~WebstorePrivateLaunchEphemeralAppFunction();
+
+ // ExtensionFunction:
+ virtual bool RunAsync() OVERRIDE;
+
+ private:
+ void OnLaunchComplete(webstore_install::Result result,
+ const std::string& error);
+ void SetResult(
+ api::webstore_private::LaunchEphemeralApp::Results::Result result,
+ const std::string& error);
+};
+
+class WebstorePrivateGetEphemeralAppsEnabledFunction
+ : public ChromeSyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("webstorePrivate.getEphemeralAppsEnabled",
+ WEBSTOREPRIVATE_GETEPHEMERALAPPSENABLED)
+
+ WebstorePrivateGetEphemeralAppsEnabledFunction();
+
+ protected:
+ virtual ~WebstorePrivateGetEphemeralAppsEnabledFunction();
+
+ // ExtensionFunction:
+ virtual bool RunSync() OVERRIDE;
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_