diff options
author | lazyboy <lazyboy@chromium.org> | 2015-06-15 19:54:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-16 02:56:26 +0000 |
commit | 0b46a9728abc55f9f5c6b402b18288f133f519ec (patch) | |
tree | 6f1e2ad9d4beb56e648175018ce07a355e2c7722 /extensions/renderer/messaging_bindings.cc | |
parent | df45c0b5db1a68a59ee5c7a64a522f6d2de67b39 (diff) | |
download | chromium_src-0b46a9728abc55f9f5c6b402b18288f133f519ec.zip chromium_src-0b46a9728abc55f9f5c6b402b18288f133f519ec.tar.gz chromium_src-0b46a9728abc55f9f5c6b402b18288f133f519ec.tar.bz2 |
Add guestRenderFrameRoutingId for <webview>s talking to component extensions.
This CL is entirely based on
https://codereview.chromium.org/782443002
BUG=415228
Test=There's no way to test this yet.
My test is to run WebViewTest.SendMessageToComponentExtensionFromGuest
and WebViewTest.SendMessageToExtensionFromGuest.
Review URL: https://codereview.chromium.org/1179713002
Cr-Commit-Position: refs/heads/master@{#334539}
Diffstat (limited to 'extensions/renderer/messaging_bindings.cc')
-rw-r--r-- | extensions/renderer/messaging_bindings.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/extensions/renderer/messaging_bindings.cc b/extensions/renderer/messaging_bindings.cc index 5dfb37c..d6ad2fb 100644 --- a/extensions/renderer/messaging_bindings.cc +++ b/extensions/renderer/messaging_bindings.cc @@ -362,6 +362,7 @@ void DispatchOnConnectToScriptContext( v8::Local<v8::Value> tab = v8::Null(isolate); v8::Local<v8::Value> tls_channel_id_value = v8::Undefined(isolate); v8::Local<v8::Value> guest_process_id = v8::Undefined(isolate); + v8::Local<v8::Value> guest_render_frame_routing_id = v8::Undefined(isolate); if (extension) { if (!source->tab.empty() && !extension->is_platform_app()) @@ -377,8 +378,11 @@ void DispatchOnConnectToScriptContext( tls_channel_id.size()); } - if (info.guest_process_id != content::ChildProcessHost::kInvalidUniqueID) + if (info.guest_process_id != content::ChildProcessHost::kInvalidUniqueID) { guest_process_id = v8::Integer::New(isolate, info.guest_process_id); + guest_render_frame_routing_id = + v8::Integer::New(isolate, info.guest_render_frame_routing_id); + } } v8::Local<v8::Value> arguments[] = { @@ -393,6 +397,8 @@ void DispatchOnConnectToScriptContext( v8::Integer::New(isolate, source->frame_id), // guestProcessId guest_process_id, + // guestRenderFrameRoutingId + guest_render_frame_routing_id, // sourceExtensionId v8::String::NewFromUtf8(isolate, info.source_id.c_str(), v8::String::kNormalString, info.source_id.size()), |