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

Unified Diff: extensions/browser/extension_function.cc

Issue 253013002: Pass RenderFrameHost to WebContentObservers' message handlers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Android tests Created 6 years, 7 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
« no previous file with comments | « content/public/browser/web_contents_observer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_function.cc
diff --git a/extensions/browser/extension_function.cc b/extensions/browser/extension_function.cc
index 470ae55635d914af573e738d14090522f04ea578..270f9074519138e4ced1497963eb1c6ef3923010 100644
--- a/extensions/browser/extension_function.cc
+++ b/extensions/browser/extension_function.cc
@@ -130,6 +130,16 @@ class UIThreadExtensionFunction::RenderHostTracker
function_->SetRenderFrameHost(NULL);
}
+ virtual bool OnMessageReceived(
+ const IPC::Message& message,
+ content::RenderFrameHost* render_frame_host) OVERRIDE {
+ DCHECK(render_frame_host);
+ if (render_frame_host == function_->render_frame_host())
+ return function_->OnMessageReceived(message);
+ else
+ return false;
+ }
+
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
return function_->OnMessageReceived(message);
}
« no previous file with comments | « content/public/browser/web_contents_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698