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

Issue 2471263003: [Presentation API] (4th)(1-UA blink side) Add WebPresentationConnection and WebPresentationConnecti… (Closed)

Created:
4 years, 1 month ago by zhaobin
Modified:
3 years, 10 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, haraken, jam, mlamouri+watch-content_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Presentation API] (4th)(1-UA blink side) Add WebPresentationConnection and WebPresentationConnectionProxy API for 1-UA messaging (Splitting of https://codereview.chromium.org/2379703002/) PresentationConnection in controlling frame should be able to send/receive message to/from PresentationConnection in receiver frame. We do it via PresentationConnectionProxy. Relation between WebPresentationConnection, WebPresentationConnectionProxy, and WebPresentationConnectionClient: PresentationConnection implements WebPresentationConnection; PresentationConnectionProxy implements WebPresentationConnectionProxy and blink::mojom::PresentationConnection. Sending message from PresentationConnectionA to PresentationConnectionB PresentationConnectionA.sendString() --> PresentationConnectionProxyA.sendString() --> (mojo call) PresentationConnectionProxyB.onMessage() --> PresentationConnectionB.didReceiveTextMessage() WebPresentationConnectionClient is not related to message sending, it stores id, url, and local proxy and is used by PresentationDispatcher class to create PresentationConnection. More details in code comments and design doc (use chromium.org account): https://docs.google.com/document/d/1XM3jhMJTQyhEC5PDAAJFNIaKh6UUEihqZDz_ztEe4Co/edit#heading=h.hadpx5oi0gml BUG=525660 Review-Url: https://codereview.chromium.org/2471263003 Cr-Commit-Position: refs/heads/master@{#446614} Committed: https://chromium.googlesource.com/chromium/src/+/7e02242dcc6044c914b9de1a18cd0d3358769824

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 16

Patch Set 3 : resolve code review comments from Mark #

Patch Set 4 : PresentationConnectionProxy::Send() will be invoked from PresentationDispatcher #

Total comments: 2

Patch Set 5 : rebase and resolve code review comments from haraken #

Total comments: 23

Patch Set 6 : resolve code review comments from Mark #

Total comments: 4

Patch Set 7 : resolve code review comments from Mark #

Patch Set 8 : merge and refactor #

Total comments: 22

Patch Set 9 : resolve code review comments from dcheng #

Total comments: 36

Patch Set 10 : resolving code review comments from Derek #

Total comments: 39

Patch Set 11 : merge with master #

Patch Set 12 : resolve code review comments from Derek and Mark #

Patch Set 13 : fix windows compile error and layout test failures #

Total comments: 19

Patch Set 14 : resolve code review comments from mlamouri #

Unified diffs Side-by-side diffs Delta from patch set Stats (+756 lines, -109 lines) Patch
M content/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
A content/renderer/presentation/presentation_connection_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +130 lines, -0 lines 0 comments Download
A content/renderer/presentation/presentation_connection_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +114 lines, -0 lines 0 comments Download
A content/renderer/presentation/presentation_connection_proxy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +114 lines, -0 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +36 lines, -19 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 17 chunks +54 lines, -27 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +18 lines, -6 lines 0 comments Download
A content/renderer/presentation/test_presentation_connection.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +34 lines, -0 lines 0 comments Download
A content/renderer/presentation/test_presentation_connection.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +22 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.cpp View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationConnection.h View 1 2 3 4 5 6 7 8 9 4 chunks +11 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +21 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationController.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationController.cpp View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationReceiver.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp View 1 2 3 4 5 6 7 3 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +16 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/exported/WebPresentationConnection.cpp View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/exported/WebPresentationConnectionCallbacks.cpp View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h View 1 2 3 4 5 6 7 8 9 2 chunks +16 lines, -13 lines 0 comments Download
A third_party/WebKit/public/platform/modules/presentation/WebPresentationConnection.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +37 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/presentation/WebPresentationConnectionCallbacks.h View 1 2 3 4 5 6 7 8 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/presentation/WebPresentationConnectionProxy.h View 1 2 3 4 5 6 7 8 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/presentation/WebPresentationController.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/modules/presentation/WebPresentationReceiver.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 58 (30 generated)
zhaobin
4 years, 1 month ago (2016-11-03 19:03:26 UTC) #2
mark a. foltz
Overall looks good with minor comments fixed. I won't approve until the design for setting ...
4 years, 1 month ago (2016-11-16 01:16:40 UTC) #3
mark a. foltz
> https://codereview.chromium.org/2471263003/diff/20001/third_party/WebKit/public/platform/modules/presentation/WebPresentationConnectionClient.h > File third_party/WebKit/public/platform/modules/presentation/WebPresentationConnectionClient.h (right): > > https://codereview.chromium.org/2471263003/diff/20001/third_party/WebKit/public/platform/modules/presentation/WebPresentationConnectionClient.h#newcode7 > third_party/WebKit/public/platform/modules/presentation/WebPresentationConnectionClient.h:7: > #include <unique_ptr> Meant ...
4 years, 1 month ago (2016-11-16 01:17:17 UTC) #4
zhaobin
Changed how to invoke PresentationConnectionProxy::Send: Before PresentationConnection::Send() -> PresentationConnectionProxy::Send() After PresentationConnection::Send() -> PresentationDispatcher::Send() -> PresentationConnectionProxy::Send() ...
4 years ago (2016-11-23 22:52:29 UTC) #6
haraken
(Just a drive-by) https://codereview.chromium.org/2471263003/diff/80001/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp File third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp (right): https://codereview.chromium.org/2471263003/diff/80001/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp#newcode105 third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp:105: new MockWebPresentationConnectionProxy()); Use wrapUnique.
4 years ago (2016-11-24 04:49:56 UTC) #8
mark a. foltz
Getting close - a few details around passing the proxy/connections I'd like to clear up. ...
4 years ago (2016-12-02 22:44:00 UTC) #9
zhaobin
https://codereview.chromium.org/2471263003/diff/80001/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp File third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp (right): https://codereview.chromium.org/2471263003/diff/80001/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp#newcode105 third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp:105: new MockWebPresentationConnectionProxy()); On 2016/11/24 04:49:55, haraken wrote: > > ...
4 years ago (2016-12-05 20:28:17 UTC) #10
mark a. foltz
LGTM with comments addressed One thing that I had a hard time getting from the ...
4 years ago (2016-12-05 22:07:29 UTC) #11
mlamouri (slow - plz ping)
lgtm I only had a look at the third_part/WebKit/ code. Let me know if you ...
4 years ago (2016-12-06 09:57:01 UTC) #12
zhaobin
Make PresentationConnectionProxy ctor takes blink::WebPresentationConnectionClient as parameter so source_connection_ should always be valid. Use PresentationConnectionClient ...
4 years ago (2016-12-08 02:41:10 UTC) #13
zhaobin
Please review the latest patch against base. Major changes from previous patches: - split PresentationConnectionProxy ...
3 years, 11 months ago (2017-01-12 22:55:01 UTC) #17
haraken
LGTM https://codereview.chromium.org/2471263003/diff/200001/third_party/WebKit/Source/platform/exported/WebPresentationConnection.cpp File third_party/WebKit/Source/platform/exported/WebPresentationConnection.cpp (right): https://codereview.chromium.org/2471263003/diff/200001/third_party/WebKit/Source/platform/exported/WebPresentationConnection.cpp#newcode1 third_party/WebKit/Source/platform/exported/WebPresentationConnection.cpp:1: // Copyright 2016 The Chromium Authors. All rights ...
3 years, 11 months ago (2017-01-13 04:01:24 UTC) #18
dcheng
LGTM with a few minor nits. https://codereview.chromium.org/2471263003/diff/200001/content/renderer/presentation/presentation_connection_proxy.cc File content/renderer/presentation/presentation_connection_proxy.cc (right): https://codereview.chromium.org/2471263003/diff/200001/content/renderer/presentation/presentation_connection_proxy.cc#newcode100 content/renderer/presentation/presentation_connection_proxy.cc:100: binding_.Bind(std::move(target_conn_request)); Nit: conn ...
3 years, 11 months ago (2017-01-17 23:31:49 UTC) #19
zhaobin
https://codereview.chromium.org/2471263003/diff/200001/content/renderer/presentation/presentation_connection_proxy.cc File content/renderer/presentation/presentation_connection_proxy.cc (right): https://codereview.chromium.org/2471263003/diff/200001/content/renderer/presentation/presentation_connection_proxy.cc#newcode100 content/renderer/presentation/presentation_connection_proxy.cc:100: binding_.Bind(std::move(target_conn_request)); On 2017/01/17 23:31:49, dcheng wrote: > Nit: conn ...
3 years, 11 months ago (2017-01-18 18:25:47 UTC) #20
imcheng
Code structure looks good overall. Just some questions. Adding more documentations to the new methods ...
3 years, 11 months ago (2017-01-20 20:15:43 UTC) #21
zhaobin
https://codereview.chromium.org/2471263003/diff/220001/content/renderer/presentation/presentation_connection_proxy.cc File content/renderer/presentation/presentation_connection_proxy.cc (right): https://codereview.chromium.org/2471263003/diff/220001/content/renderer/presentation/presentation_connection_proxy.cc#newcode29 content/renderer/presentation/presentation_connection_proxy.cc:29: DCHECK(target_connection_); On 2017/01/20 20:15:43, imcheng wrote: > What prevents ...
3 years, 11 months ago (2017-01-23 19:38:50 UTC) #22
mark a. foltz
Still LGTM with comments addressed. The design has evolved somewhat since the last review by ...
3 years, 11 months ago (2017-01-23 20:18:43 UTC) #23
imcheng
lgtm after comments addressed. https://codereview.chromium.org/2471263003/diff/240001/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp File third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp (right): https://codereview.chromium.org/2471263003/diff/240001/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp#newcode316 third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp:316: if (!client || !m_proxy) 2-ua ...
3 years, 11 months ago (2017-01-23 22:02:35 UTC) #24
zhaobin
mlamouri@, could you please re-review the third_party/Webkit code since the design has evolved somewhat? https://codereview.chromium.org/2471263003/diff/240001/content/renderer/presentation/presentation_connection_proxy.cc ...
3 years, 11 months ago (2017-01-24 01:23:24 UTC) #25
mlamouri (slow - plz ping)
My comments are mostly on the surface. It looks okay but I didn't dig very ...
3 years, 11 months ago (2017-01-26 22:18:03 UTC) #38
zhaobin
https://codereview.chromium.org/2471263003/diff/300001/content/renderer/presentation/presentation_connection_proxy.cc File content/renderer/presentation/presentation_connection_proxy.cc (right): https://codereview.chromium.org/2471263003/diff/300001/content/renderer/presentation/presentation_connection_proxy.cc#newcode54 content/renderer/presentation/presentation_connection_proxy.cc:54: break; On 2017/01/26 22:18:02, mlamouri (slow) wrote: > nit: ...
3 years, 11 months ago (2017-01-26 22:48:14 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2471263003/320001
3 years, 10 months ago (2017-01-27 01:08:36 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/351664)
3 years, 10 months ago (2017-01-27 01:34:26 UTC) #48
zhaobin
+jam@ to review content/renderer/BUILD.gn
3 years, 10 months ago (2017-01-27 01:37:17 UTC) #50
jam1
lgtm
3 years, 10 months ago (2017-01-27 04:26:16 UTC) #52
jam
lgtm
3 years, 10 months ago (2017-01-27 06:25:05 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2471263003/320001
3 years, 10 months ago (2017-01-27 06:28:11 UTC) #55
commit-bot: I haz the power
3 years, 10 months ago (2017-01-27 06:39:55 UTC) #58
Message was sent while issue was closed.
Committed patchset #14 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/7e02242dcc6044c914b9de1a18cd...

Powered by Google App Engine
This is Rietveld 408576698