Index: chrome/renderer/extensions/runtime_custom_bindings.cc |
diff --git a/chrome/renderer/extensions/runtime_custom_bindings.cc b/chrome/renderer/extensions/runtime_custom_bindings.cc |
index 96139f3a38746679a42a6640d6637733f65e0502..b41f43cc97c0d43a1e324e3dbc1d98bf93e702b9 100644 |
--- a/chrome/renderer/extensions/runtime_custom_bindings.cc |
+++ b/chrome/renderer/extensions/runtime_custom_bindings.cc |
@@ -14,6 +14,9 @@ |
#include "chrome/renderer/extensions/dispatcher.h" |
#include "content/public/renderer/render_view.h" |
#include "content/public/renderer/v8_value_converter.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
using content::V8ValueConverter; |
@@ -50,16 +53,14 @@ v8::Handle<v8::Value> RuntimeCustomBindings::OpenChannelToExtension( |
args[1]->IsString() && |
args[2]->IsString()); |
- std::string source_id = *v8::String::Utf8Value(args[0]->ToString()); |
- std::string target_id = *v8::String::Utf8Value(args[1]->ToString()); |
+ ExtensionMsg_ExternalConnectionInfo info; |
+ info.source_id = *v8::String::Utf8Value(args[0]->ToString()); |
+ info.target_id = *v8::String::Utf8Value(args[1]->ToString()); |
+ info.source_url = renderview->GetWebView()->mainFrame()->document().url(); |
std::string channel_name = *v8::String::Utf8Value(args[2]->ToString()); |
int port_id = -1; |
renderview->Send(new ExtensionHostMsg_OpenChannelToExtension( |
- renderview->GetRoutingID(), |
- source_id, |
- target_id, |
- channel_name, |
- &port_id)); |
+ renderview->GetRoutingID(), info, channel_name, &port_id)); |
return v8::Integer::New(port_id); |
} |