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

Unified Diff: chrome/renderer/extensions/renderer_extension_bindings.cc

Issue 113085: Split V8Proxy::retrieveActiveFrame() into two methods. (Closed)
Patch Set: Darin feedback Created 11 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 | « chrome/renderer/extensions/extension_process_bindings.cc ('k') | chrome/renderer/external_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/renderer_extension_bindings.cc
diff --git a/chrome/renderer/extensions/renderer_extension_bindings.cc b/chrome/renderer/extensions/renderer_extension_bindings.cc
index 4d894a493e3ff2fb888d738e5fa631f252c5cd2e..86d3d15a84d649fab6a126d18f7705c41d11b3be 100755
--- a/chrome/renderer/extensions/renderer_extension_bindings.cc
+++ b/chrome/renderer/extensions/renderer_extension_bindings.cc
@@ -49,7 +49,9 @@ class ExtensionImpl : public v8::Extension {
// Creates a new messaging channel to the given extension.
static v8::Handle<v8::Value> OpenChannelToExtension(
const v8::Arguments& args) {
- RenderView* renderview = GetActiveRenderView();
+ // Get the current RenderView so that we can send a routed IPC message from
+ // the correct source.
+ RenderView* renderview = GetRenderViewForCurrentContext();
if (!renderview)
return v8::Undefined();
@@ -65,7 +67,7 @@ class ExtensionImpl : public v8::Extension {
// Sends a message along the given channel.
static v8::Handle<v8::Value> PostMessage(const v8::Arguments& args) {
- RenderView* renderview = GetActiveRenderView();
+ RenderView* renderview = GetRenderViewForCurrentContext();
if (!renderview)
return v8::Undefined();
« no previous file with comments | « chrome/renderer/extensions/extension_process_bindings.cc ('k') | chrome/renderer/external_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698