diff options
author | vrk <vrk@chromium.org> | 2015-01-09 16:05:32 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-10 00:06:34 +0000 |
commit | 85dfc5c2d0e02a291749f6965b5e271af5b1956d (patch) | |
tree | 4a2940de333d216d6443e18f95e9a235650b783d /extensions/renderer/messaging_bindings.cc | |
parent | a868d823efb862ad18ceabdf9eb8b60b67f6350c (diff) | |
download | chromium_src-85dfc5c2d0e02a291749f6965b5e271af5b1956d.zip chromium_src-85dfc5c2d0e02a291749f6965b5e271af5b1956d.tar.gz chromium_src-85dfc5c2d0e02a291749f6965b5e271af5b1956d.tar.bz2 |
Add guestProcessId for WebViews talking to component extensions
This enables logging to work on the Hangouts packaged app and
Chromebox for meetings.
BUG=424762
Review URL: https://codereview.chromium.org/782443002
Cr-Commit-Position: refs/heads/master@{#310903}
Diffstat (limited to 'extensions/renderer/messaging_bindings.cc')
-rw-r--r-- | extensions/renderer/messaging_bindings.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/extensions/renderer/messaging_bindings.cc b/extensions/renderer/messaging_bindings.cc index cb24496..01a2199 100644 --- a/extensions/renderer/messaging_bindings.cc +++ b/extensions/renderer/messaging_bindings.cc @@ -13,11 +13,13 @@ #include "base/lazy_instance.h" #include "base/message_loop/message_loop.h" #include "base/values.h" +#include "content/public/common/child_process_host.h" #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/v8_value_converter.h" #include "extensions/common/api/messaging/message.h" #include "extensions/common/extension_messages.h" +#include "extensions/common/guest_view/guest_view_constants.h" #include "extensions/common/manifest_handlers/externally_connectable.h" #include "extensions/renderer/dispatcher.h" #include "extensions/renderer/event_bindings.h" @@ -265,6 +267,7 @@ void DispatchOnConnectToScriptContext( v8::Handle<v8::Value> tab = v8::Null(isolate); v8::Handle<v8::Value> tls_channel_id_value = v8::Undefined(isolate); + v8::Handle<v8::Value> guest_process_id = v8::Undefined(isolate); if (extension) { if (!source->tab.empty() && !extension->is_platform_app()) @@ -279,6 +282,9 @@ void DispatchOnConnectToScriptContext( v8::String::kNormalString, tls_channel_id.size()); } + + if (info.guest_process_id != content::ChildProcessHost::kInvalidUniqueID) + guest_process_id = v8::Integer::New(isolate, info.guest_process_id); } v8::Handle<v8::Value> arguments[] = { @@ -293,6 +299,8 @@ void DispatchOnConnectToScriptContext( tab, // source_frame_id v8::Integer::New(isolate, source->frame_id), + // guestProcessId + guest_process_id, // sourceExtensionId v8::String::NewFromUtf8(isolate, info.source_id.c_str(), |