diff options
author | rdevlin.cronin <rdevlin.cronin@chromium.org> | 2015-06-10 16:32:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-10 23:33:30 +0000 |
commit | cb2ec659ab8741962f3391970a5fff512ebb6509 (patch) | |
tree | 84c87ca2540a0f0e7dc66bb0b82a5abc79ad012b /extensions/browser/api/extensions_api_client.h | |
parent | 1bcab9592f6213b9f44379bb66ce7b613b371e0b (diff) | |
download | chromium_src-cb2ec659ab8741962f3391970a5fff512ebb6509.zip chromium_src-cb2ec659ab8741962f3391970a5fff512ebb6509.tar.gz chromium_src-cb2ec659ab8741962f3391970a5fff512ebb6509.tar.bz2 |
[Extensions] Clean up the handling of ExtensionHostMsg_Request
ExtensionHostMsg_Request is sent when an extension calls an API function. Before
this patch, this IPC would be sent to one of 11 different call sites, all of
which then routed it to the ExtensionFunctionDispatcher - and all of which
have to implement ExtensionFunctionDispatcher::Delegate.
Instead, have ExtensionWebContentsObserver handle the IPC, since it is created
(or should be) for all extension web contents. This also lets us eliminate many
(though not all) of the ExtensionFunctionDispatcher::Delegate implementations
(I will try to clean more up in a later patch).
The size of this patch is due to a number of yaks that needed shaving along the
way - in particular, around GuestView.
BUG=498017
BUG=405246
Review URL: https://codereview.chromium.org/1169223002
Cr-Commit-Position: refs/heads/master@{#333843}
Diffstat (limited to 'extensions/browser/api/extensions_api_client.h')
-rw-r--r-- | extensions/browser/api/extensions_api_client.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/extensions/browser/api/extensions_api_client.h b/extensions/browser/api/extensions_api_client.h index 4800040..35f0114 100644 --- a/extensions/browser/api/extensions_api_client.h +++ b/extensions/browser/api/extensions_api_client.h @@ -31,8 +31,6 @@ class ContentRulesRegistry; class DevicePermissionsPrompt; class ExtensionOptionsGuest; class ExtensionOptionsGuestDelegate; -class ExtensionViewGuest; -class ExtensionViewGuestDelegate; class ManagementAPIDelegate; class MimeHandlerViewGuest; class MimeHandlerViewGuestDelegate; @@ -72,6 +70,11 @@ class ExtensionsAPIClient { observers, std::map<settings_namespace::Namespace, ValueStoreCache*>* caches); + // Attaches any extra web contents helpers (like ExtensionWebContentsObserver) + // to |web_contents|. + virtual void AttachWebContentsHelpers(content::WebContents* web_contents) + const; + // Creates the AppViewGuestDelegate. virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const; @@ -80,11 +83,6 @@ class ExtensionsAPIClient { virtual ExtensionOptionsGuestDelegate* CreateExtensionOptionsGuestDelegate( ExtensionOptionsGuest* guest) const; - // Returns a delegate for ExtensionViewGuest. The caller owns the returned - // ExtensionViewGuestDelegate. - virtual ExtensionViewGuestDelegate* CreateExtensionViewGuestDelegate( - ExtensionViewGuest* guest) const; - // Creates a delegate for MimeHandlerViewGuest. virtual scoped_ptr<MimeHandlerViewGuestDelegate> CreateMimeHandlerViewGuestDelegate(MimeHandlerViewGuest* guest) const; |