| Index: chrome/browser/extensions/tab_helper.h
|
| diff --git a/chrome/browser/extensions/tab_helper.h b/chrome/browser/extensions/tab_helper.h
|
| index 5e81fbaa75e5a9123e9368fb25fc02a8248b01a9..c33d963a9d9199c4cb985ad18feb9cda726d599c 100644
|
| --- a/chrome/browser/extensions/tab_helper.h
|
| +++ b/chrome/browser/extensions/tab_helper.h
|
| @@ -16,10 +16,12 @@
|
| #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/webstore_install_result.h"
|
| #include "chrome/common/web_application_info.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| +#include "content/public/browser/web_contents_binding_set.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "content/public/browser/web_contents_user_data.h"
|
| #include "extensions/browser/extension_function_dispatcher.h"
|
| @@ -45,7 +47,8 @@ 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;
|
|
|
| @@ -114,6 +117,8 @@ class TabHelper : public content::WebContentsObserver,
|
| private:
|
| class InlineInstallObserver;
|
|
|
| + extensions::mojom::InlineInstallStatusPtr inline_install_status_;
|
| +
|
| // Utility function to invoke member functions on all relevant
|
| // ContentRulesRegistries.
|
| template <class Func>
|
| @@ -128,6 +133,7 @@ class TabHelper : public content::WebContentsObserver,
|
| };
|
|
|
| explicit TabHelper(content::WebContents* web_contents);
|
| +
|
| friend class content::WebContentsUserData<TabHelper>;
|
|
|
| // Displays UI for completion of creating a bookmark hosted app.
|
| @@ -154,13 +160,14 @@ class TabHelper : public content::WebContentsObserver,
|
| const Extension* extension,
|
| UnloadedExtensionInfo::Reason reason) override;
|
|
|
| + // mojom::InlineInstall:
|
| + void DoInlineInstall(int install_id,
|
| + const std::string& webstore_item_id,
|
| + int listeners_mask,
|
| + const DoInlineInstallCallback& callback) 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,
|
| @@ -181,8 +188,8 @@ class TabHelper : public content::WebContentsObserver,
|
| void OnImageLoaded(const gfx::Image& image);
|
|
|
| // WebstoreStandaloneInstaller::Callback.
|
| - void OnInlineInstallComplete(int install_id,
|
| - int return_route_id,
|
| + void OnInlineInstallComplete(const DoInlineInstallCallback& callback,
|
| + int install_id,
|
| const ExtensionId& extension_id,
|
| bool success,
|
| const std::string& error,
|
| @@ -190,8 +197,8 @@ class TabHelper : public content::WebContentsObserver,
|
|
|
| // ExtensionReenabler::Callback.
|
| void OnReenableComplete(int install_id,
|
| - int return_route_id,
|
| const ExtensionId& extension_id,
|
| + const DoInlineInstallCallback& callback,
|
| ExtensionReenabler::ReenableResult result);
|
|
|
| // content::NotificationObserver.
|
| @@ -263,6 +270,9 @@ class TabHelper : public content::WebContentsObserver,
|
| // The set of extension ids that are currently being installed.
|
| std::set<ExtensionId> pending_inline_installations_;
|
|
|
| + content::WebContentsFrameBindingSet<extensions::mojom::InlineInstall>
|
| + bindings_;
|
| +
|
| // Vend weak pointers that can be invalidated to stop in-progress loads.
|
| base::WeakPtrFactory<TabHelper> image_loader_ptr_factory_;
|
|
|
|
|