diff options
author | gbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-18 00:08:05 +0000 |
---|---|---|
committer | gbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-18 00:08:05 +0000 |
commit | 4e1eb33991bb0abb9fc3f398953232e6a90cb240 (patch) | |
tree | 0d96c1aa26e7947df1413f0be30416d2dc1824ff | |
parent | d9138254ef1e5222e1390ac216368ff3e2b6baa4 (diff) | |
download | chromium_src-4e1eb33991bb0abb9fc3f398953232e6a90cb240.zip chromium_src-4e1eb33991bb0abb9fc3f398953232e6a90cb240.tar.gz chromium_src-4e1eb33991bb0abb9fc3f398953232e6a90cb240.tar.bz2 |
Copy over ports.
BUG=None
TEST=None
Review URL: https://chromiumcodereview.appspot.com/10337006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137778 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/renderer/render_view_impl.cc | 16 | ||||
-rw-r--r-- | webkit/glue/web_intent_data.h | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index f273d4a..117415a 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -41,6 +41,7 @@ #include "content/common/request_extra_data.h" #include "content/common/socket_stream_handle_data.h" #include "content/common/view_messages.h" +#include "content/common/webmessageportchannel_impl.h" #include "content/public/common/bindings_policy.h" #include "content/public/common/content_client.h" #include "content/public/common/content_constants.h" @@ -118,6 +119,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentRequest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentServiceInfo.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" @@ -3528,6 +3530,20 @@ void RenderViewImpl::registerIntentService( void RenderViewImpl::dispatchIntent( WebFrame* frame, const WebIntentRequest& intentRequest) { webkit_glue::WebIntentData intent_data(intentRequest.intent()); + + // See WebMessagePortChannelImpl::postMessage() and ::OnMessagedQueued() + WebKit::WebMessagePortChannelArray* channels = + intentRequest.intent().messagePortChannelsRelease(); + if (channels) { + for (size_t i = 0; i < channels->size(); ++i) { + WebMessagePortChannelImpl* webchannel = + static_cast<WebMessagePortChannelImpl*>((*channels)[i]); + intent_data.message_port_ids.push_back(webchannel->message_port_id()); + DCHECK(intent_data.message_port_ids[i] != MSG_ROUTING_NONE); + } + delete channels; + } + int id = intents_host_->RegisterWebIntent(intentRequest); Send(new IntentsHostMsg_WebIntentDispatch( routing_id_, intent_data, id)); diff --git a/webkit/glue/web_intent_data.h b/webkit/glue/web_intent_data.h index e6d57e5..52597cd 100644 --- a/webkit/glue/web_intent_data.h +++ b/webkit/glue/web_intent_data.h @@ -57,6 +57,9 @@ struct WEBKIT_GLUE_EXPORT WebIntentData { DataType data_type; WebIntentData(); + + // NOTE! Constructors do not initialize message_port_ids. Caller must do this. + WebIntentData(const WebKit::WebIntent& intent); WebIntentData(const string16& action_in, const string16& type_in, |