summaryrefslogtreecommitdiffstats
path: root/extensions/browser/extension_web_contents_observer.h
diff options
context:
space:
mode:
authorrdevlin.cronin <rdevlin.cronin@chromium.org>2015-06-12 10:00:56 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-12 17:01:58 +0000
commit92503bacf38b62d3fca8a4abe74ed78b063dd2e5 (patch)
treeb5ab4581cfb0e3cfaffa85c08d34d271c2e24068 /extensions/browser/extension_web_contents_observer.h
parent32ef655504fc0d3ac78223cab669baa32e6118db (diff)
downloadchromium_src-92503bacf38b62d3fca8a4abe74ed78b063dd2e5.zip
chromium_src-92503bacf38b62d3fca8a4abe74ed78b063dd2e5.tar.gz
chromium_src-92503bacf38b62d3fca8a4abe74ed78b063dd2e5.tar.bz2
[Extensions OOPI] Convert extension functions to use RenderFrameHosts
Make ExtensionHostMsg_Request/Response send to RenderFrameHosts/RenderFrames so that OOPI work with extension api calls. Also update ExtensionFunctions to only have RenderFrameHosts set, and remove the |render_view_host_| parameter, and update ExtensionFunction's internals to use RenderFrameHost. Note that this doesn't update all the uses of ExtensionFunction::render_view_host() (of which there are 100+). BUG=498017 Review URL: https://codereview.chromium.org/1182493002 Cr-Commit-Position: refs/heads/master@{#334185}
Diffstat (limited to 'extensions/browser/extension_web_contents_observer.h')
-rw-r--r--extensions/browser/extension_web_contents_observer.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/extensions/browser/extension_web_contents_observer.h b/extensions/browser/extension_web_contents_observer.h
index 2989e05..32e44c7 100644
--- a/extensions/browser/extension_web_contents_observer.h
+++ b/extensions/browser/extension_web_contents_observer.h
@@ -56,7 +56,8 @@ class ExtensionWebContentsObserver
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
// Subclasses should call this first before doing their own message handling.
- bool OnMessageReceived(const IPC::Message& message) override;
+ bool OnMessageReceived(const IPC::Message& message,
+ content::RenderFrameHost* render_frame_host) override;
// Per the documentation in WebContentsObserver, these two methods are
// appropriate to track the set of current RenderFrameHosts.
@@ -82,7 +83,8 @@ class ExtensionWebContentsObserver
static std::string GetExtensionId(content::RenderViewHost* render_view_host);
private:
- void OnRequest(const ExtensionHostMsg_Request_Params& params);
+ void OnRequest(content::RenderFrameHost* render_frame_host,
+ const ExtensionHostMsg_Request_Params& params);
// The BrowserContext associated with the WebContents being observed.
content::BrowserContext* browser_context_;