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

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

Issue 2791533002: Convert Web Store Inline Install IPCs to mojo (Closed)
Patch Set: Created 3 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/tab_helper.h
diff --git a/chrome/browser/extensions/tab_helper.h b/chrome/browser/extensions/tab_helper.h
index 7e353917bc66771946798ac2cccccbcfb8d2d3a2..800eef7defd421ccdf6eb425f75671b7e6b62013 100644
--- a/chrome/browser/extensions/tab_helper.h
+++ b/chrome/browser/extensions/tab_helper.h
@@ -16,6 +16,8 @@
#include "base/scoped_observer.h"
#include "chrome/browser/extensions/active_tab_permission_granter.h"
#include "chrome/browser/extensions/extension_reenabler.h"
+#include "chrome/common/extensions/mojo/inline_install.mojom.h"
+#include "chrome/common/extensions/mojo/inline_install_status.mojom.h"
#include "chrome/common/extensions/webstore_install_result.h"
#include "chrome/common/web_application_info.h"
#include "content/public/browser/notification_observer.h"
@@ -46,10 +48,14 @@ class TabHelper : public content::WebContentsObserver,
public ExtensionFunctionDispatcher::Delegate,
public ExtensionRegistryObserver,
public content::NotificationObserver,
- public content::WebContentsUserData<TabHelper> {
+ public content::WebContentsUserData<TabHelper>,
+ public mojom::InlineInstall {
public:
~TabHelper() override;
+ static void BindInlineInstallRequest(content::WebContents* web_contents,
+ mojom::InlineInstallRequest request);
+
void CreateApplicationShortcuts();
void CreateHostedAppFromWebContents();
bool CanCreateApplicationShortcuts() const;
@@ -118,6 +124,11 @@ class TabHelper : public content::WebContentsObserver,
void SetWebstoreInlineInstallerFactoryForTests(
WebstoreInlineInstallerFactory* factory);
+ explicit TabHelper(content::WebContents* web_contents);
+
+ protected:
+ extensions::mojom::InlineInstallStatusPtr inline_install_status_;
+
private:
class InlineInstallObserver;
@@ -135,7 +146,6 @@ class TabHelper : public content::WebContentsObserver,
UPDATE_SHORTCUT // Update icon for app shortcut.
};
- explicit TabHelper(content::WebContents* web_contents);
friend class content::WebContentsUserData<TabHelper>;
// Displays UI for completion of creating a bookmark hosted app.
@@ -162,13 +172,14 @@ class TabHelper : public content::WebContentsObserver,
const Extension* extension,
UnloadedExtensionInfo::Reason reason) override;
+ // mojom::InlineInstall
+ void InlineWebstoreInstall(int install_id,
+ int return_route_id,
+ const std::string& webstore_item_id,
+ int listeners_mask) override;
+
// Message handlers.
void OnDidGetWebApplicationInfo(const WebApplicationInfo& info);
- void OnInlineWebstoreInstall(content::RenderFrameHost* host,
- int install_id,
- int return_route_id,
- const std::string& webstore_item_id,
- int listeners_mask);
void OnGetAppInstallState(content::RenderFrameHost* host,
const GURL& requestor_url,
int return_route_id,

Powered by Google App Engine
This is Rietveld 408576698