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

Issue 921013002: Optionally have MessagePort pass data as base::Value, part 1. (Closed)

Created:
5 years, 10 months ago by Marijn Kruisselbrink
Modified:
5 years, 9 months ago
CC:
chromium-reviews, michaeln, mlamouri+watch-content_chromium.org, tzik, serviceworker-reviews, jam, jsbell+serviceworker_chromium.org, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, kinuko+serviceworker, kinuko+watch
Base URL:
https://chromium.googlesource.com/chromium/src.git@n-c-move-v8-value-converter
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optionally have MessagePort pass data as base::Value, part 1. Various efforts (android webview, navigator.connect) are experimenting with using MessagePort as a way to communicate with native code. This is a start at refactoring MessagePort code to make this possible. This CL changes the IPCs for MessagePort messages to pass the data as a MessagePortMessage struct, adding support to the renderer side MessagePort code to support both base::Value and blink::WebSerializedScriptValue messages. Additionally a (currently unset) flag is added that determines how MessagePort sends messages back to the browser process. This is part of a series of changes: [1/5] Blink side changes in https://codereview.chromium.org/924983002/ that expose a needed v8 context [2/5] This CL [3/5] https://codereview.chromium.org/944443003/ which causes the send_messages_as_values flag to be propagated [4/5] https://codereview.chromium.org/938403005/ which uses this for navigator.connect services and adds infrastructure for layout tests [5/5] https://codereview.chromium.org/940423004/ adds layout tests to blink to test these new features BUG=426458 Committed: https://crrev.com/09ac29ceebbed0fa9a4500ee6e78acb13ebf9eaa Cr-Commit-Position: refs/heads/master@{#318492}

Patch Set 1 #

Total comments: 9

Patch Set 2 : rebase and small fixes #

Patch Set 3 : rename message_port_message.h to message_port_types.h #

Patch Set 4 : update to match changes in blink side patch #

Total comments: 2

Patch Set 5 : fix typo in comment #

Patch Set 6 : address scheib's comments and more #

Patch Set 7 : fix android webview compile #

Total comments: 12

Patch Set 8 : Update singly-included comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+210 lines, -60 lines) Patch
M android_webview/browser/aw_message_port_message_filter.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/aw_message_port_message_filter.cc View 1 2 3 4 5 6 3 chunks +8 lines, -3 lines 0 comments Download
M content/browser/message_port_message_filter.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/message_port_message_filter.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/message_port_provider.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/message_port_provider_browsertest.cc View 1 5 chunks +8 lines, -6 lines 0 comments Download
M content/browser/message_port_service.h View 1 2 4 chunks +4 lines, -3 lines 0 comments Download
M content/browser/message_port_service.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/navigator_connect/navigator_connect_service_worker_service_factory.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M content/browser/shared_worker/shared_worker_service_impl_unittest.cc View 5 chunks +15 lines, -14 lines 0 comments Download
M content/child/navigator_connect/navigator_connect_provider.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/child/webmessageportchannel_impl.h View 1 2 3 4 5 4 chunks +10 lines, -3 lines 0 comments Download
M content/child/webmessageportchannel_impl.cc View 1 2 3 4 5 8 chunks +42 lines, -11 lines 0 comments Download
M content/common/message_port_messages.h View 1 2 3 4 5 6 7 3 chunks +10 lines, -4 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/browser/message_port_delegate.h View 2 chunks +2 lines, -1 line 0 comments Download
M content/public/browser/message_port_provider.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
A content/public/common/message_port_types.h View 1 2 3 4 5 1 chunk +42 lines, -0 lines 0 comments Download
A content/public/common/message_port_types.cc View 1 2 3 4 5 1 chunk +46 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_script_context.cc View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 35 (12 generated)
Marijn Kruisselbrink
5 years, 10 months ago (2015-02-18 01:48:22 UTC) #5
scheib
lgtm https://codereview.chromium.org/921013002/diff/60001/content/child/webmessageportchannel_impl.cc File content/child/webmessageportchannel_impl.cc (right): https://codereview.chromium.org/921013002/diff/60001/content/child/webmessageportchannel_impl.cc#newcode159 content/child/webmessageportchannel_impl.cc:159: if (message_queue_.front().message.message_as_value.Get(0, Seems a bit implicit, would read ...
5 years, 10 months ago (2015-02-18 20:58:56 UTC) #7
scheib
https://codereview.chromium.org/921013002/diff/60001/content/public/common/message_port_message.h File content/public/common/message_port_message.h (right): https://codereview.chromium.org/921013002/diff/60001/content/public/common/message_port_message.h#newcode21 content/public/common/message_port_message.h:21: explicit MessagePortMessage(const base::Value* message); Perhaps just take ownership of ...
5 years, 10 months ago (2015-02-18 21:03:23 UTC) #8
adamk
Thanks for the detailed explanation over in https://codereview.chromium.org/924983002/. I've responded over here since it's where ...
5 years, 10 months ago (2015-02-18 21:34:46 UTC) #9
adamk
From offline discussion, it seems the the major blocker on using something other than v8::Value ...
5 years, 10 months ago (2015-02-18 22:11:07 UTC) #10
Marijn Kruisselbrink
On 2015/02/18 22:11:07, adamk wrote: > From offline discussion, it seems the the major blocker ...
5 years, 10 months ago (2015-02-20 23:15:41 UTC) #12
Marijn Kruisselbrink
+avi for content/ OWNERS
5 years, 9 months ago (2015-02-26 18:48:26 UTC) #14
Avi (use Gerrit)
lgtm stamp https://codereview.chromium.org/921013002/diff/120001/content/child/webmessageportchannel_impl.h File content/child/webmessageportchannel_impl.h (right): https://codereview.chromium.org/921013002/diff/120001/content/child/webmessageportchannel_impl.h#newcode101 content/child/webmessageportchannel_impl.h:101: // Flag to indicate if messages should ...
5 years, 9 months ago (2015-02-26 19:08:53 UTC) #15
scheib
mek@, looks like you overlooked addressing my comments from #7.
5 years, 9 months ago (2015-02-26 21:33:47 UTC) #16
Marijn Kruisselbrink
On 2015/02/26 21:33:47, scheib wrote: > mek@, looks like you overlooked addressing my comments from ...
5 years, 9 months ago (2015-02-26 23:12:54 UTC) #17
Marijn Kruisselbrink
+sgurun for android_webview OWNERS +tsepez for IPC OWNERS
5 years, 9 months ago (2015-02-27 01:05:43 UTC) #21
sgurun-gerrit only
On 2015/02/27 01:05:43, Marijn Kruisselbrink wrote: > +sgurun for android_webview OWNERS > +tsepez for IPC ...
5 years, 9 months ago (2015-02-27 03:17:19 UTC) #22
sgurun-gerrit only
https://codereview.chromium.org/921013002/diff/220001/android_webview/browser/aw_message_port_message_filter.cc File android_webview/browser/aw_message_port_message_filter.cc (right): https://codereview.chromium.org/921013002/diff/220001/android_webview/browser/aw_message_port_message_filter.cc#newcode51 android_webview/browser/aw_message_port_message_filter.cc:51: // to the renderer directly. I don't know what ...
5 years, 9 months ago (2015-02-27 03:17:37 UTC) #23
Marijn Kruisselbrink
https://codereview.chromium.org/921013002/diff/220001/android_webview/browser/aw_message_port_message_filter.cc File android_webview/browser/aw_message_port_message_filter.cc (right): https://codereview.chromium.org/921013002/diff/220001/android_webview/browser/aw_message_port_message_filter.cc#newcode51 android_webview/browser/aw_message_port_message_filter.cc:51: // to the renderer directly. On 2015/02/27 03:17:36, sgurun ...
5 years, 9 months ago (2015-02-27 05:00:58 UTC) #24
sgurun-gerrit only
https://codereview.chromium.org/921013002/diff/220001/android_webview/browser/aw_message_port_message_filter.cc File android_webview/browser/aw_message_port_message_filter.cc (right): https://codereview.chromium.org/921013002/diff/220001/android_webview/browser/aw_message_port_message_filter.cc#newcode51 android_webview/browser/aw_message_port_message_filter.cc:51: // to the renderer directly. On 2015/02/27 05:00:57, Marijn ...
5 years, 9 months ago (2015-02-27 18:06:50 UTC) #25
Tom Sepez
Messages LGTM. https://codereview.chromium.org/921013002/diff/220001/content/common/message_port_messages.h File content/common/message_port_messages.h (right): https://codereview.chromium.org/921013002/diff/220001/content/common/message_port_messages.h#newcode25 content/common/message_port_messages.h:25: // Singly-included section, not converted. nit: As ...
5 years, 9 months ago (2015-02-27 18:16:06 UTC) #26
Marijn Kruisselbrink
https://codereview.chromium.org/921013002/diff/220001/android_webview/browser/aw_message_port_message_filter.cc File android_webview/browser/aw_message_port_message_filter.cc (right): https://codereview.chromium.org/921013002/diff/220001/android_webview/browser/aw_message_port_message_filter.cc#newcode51 android_webview/browser/aw_message_port_message_filter.cc:51: // to the renderer directly. On 2015/02/27 18:06:50, sgurun ...
5 years, 9 months ago (2015-02-27 18:17:51 UTC) #27
Marijn Kruisselbrink
https://codereview.chromium.org/921013002/diff/220001/content/common/message_port_messages.h File content/common/message_port_messages.h (right): https://codereview.chromium.org/921013002/diff/220001/content/common/message_port_messages.h#newcode25 content/common/message_port_messages.h:25: // Singly-included section, not converted. On 2015/02/27 18:16:05, Tom ...
5 years, 9 months ago (2015-02-27 18:20:16 UTC) #28
sgurun-gerrit only
On 2015/02/27 18:20:16, Marijn Kruisselbrink wrote: > https://codereview.chromium.org/921013002/diff/220001/content/common/message_port_messages.h > File content/common/message_port_messages.h (right): > > https://codereview.chromium.org/921013002/diff/220001/content/common/message_port_messages.h#newcode25 ...
5 years, 9 months ago (2015-02-27 18:33:13 UTC) #29
sgurun-gerrit only
https://codereview.chromium.org/921013002/diff/220001/android_webview/browser/aw_message_port_message_filter.cc File android_webview/browser/aw_message_port_message_filter.cc (right): https://codereview.chromium.org/921013002/diff/220001/android_webview/browser/aw_message_port_message_filter.cc#newcode51 android_webview/browser/aw_message_port_message_filter.cc:51: // to the renderer directly. On 2015/02/27 18:17:51, Marijn ...
5 years, 9 months ago (2015-02-27 18:33:26 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/921013002/240001
5 years, 9 months ago (2015-02-27 18:35:41 UTC) #33
commit-bot: I haz the power
Committed patchset #8 (id:240001)
5 years, 9 months ago (2015-02-27 19:13:02 UTC) #34
commit-bot: I haz the power
5 years, 9 months ago (2015-02-27 19:14:13 UTC) #35
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/09ac29ceebbed0fa9a4500ee6e78acb13ebf9eaa
Cr-Commit-Position: refs/heads/master@{#318492}

Powered by Google App Engine
This is Rietveld 408576698