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

Issue 2471573005: [Presentation API] (5th) (1-UA) integrate controller and receiver side for 1-UA messaging (Closed)

Created:
4 years, 1 month ago by zhaobin
Modified:
3 years, 8 months ago
Reviewers:
mark a. foltz, imcheng, jam, miu
CC:
Aaron Boodman, abarth-chromium, blink-reviews, blink-reviews-api_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, extensions-reviews_chromium.org, jam, miu+watch_chromium.org, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, takumif, viettrungluu+watch_chromium.org, xjz+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Presentation API] (5th)(1-UA) integrate controller and receiver side for 1-UA messaging This CL actually turns on 1-UA messaging: - When presentation starts, a new route is created and returned to MR. In PresentationDispatcher, we send controller_connection_proxy and receiver_connection_request back to browser via PresentationService::SetPresentationConnection() For 1-UA: - In PresentationServiceDelegateImpl::ConnectToPresentation(), we register proxy and request as a controller connection entry to OPM. If there has been a receiver_call_back, invoke it; - When offscreen tab is rendered, we register a receiverPSDImpl, which registers a receiver_call_back to OPM. If there is any pending controller connection entry, invoke receiver_call_back for each controller connection entry; - In receiver_call_back (PresentationDispatcher::OnReceiverConnectionAvailable() function), we create a receiver_connection_proxy object, bind it to receiver_connection_request (input parameter) and connect it with controller_connection_proxy (input parameter). Message sending between controller Blink connection and receiver Blink connection may happen afterwards. For 2-UA: - In PresentationServiceDelegateImpl::ConnectToPresentation(), we create a browser_connection_proxy object, bind it to receiver_connection_request (input parameter) and connect it with controller_connection_proxy (input parameter). Message sending from controller Blink connection to media router may happen afterwards. More details in code comments and design doc (use chromium.org account): https://docs.google.com/document/d/1XM3jhMJTQyhEC5PDAAJFNIaKh6UUEihqZDz_ztEe4Co/edit#heading=h.hadpx5oi0gml Patch set 4 updates: - added BrowserPresentationConnectionProxy class - Added PresentationFrame::IsOffscreen() and PresentationFrame::OnBrowserConnectionAvailable() - PresentationConnection::OnMessage() takes a callback - PresentationDispatcher::SendXXX() takes PresentationConnectionProxy as parameter BUG=525660, 513859 Review-Url: https://codereview.chromium.org/2471573005 Cr-Original-Commit-Position: refs/heads/master@{#448299} Committed: https://chromium.googlesource.com/chromium/src/+/4b94a1fe3f58aacad2c46bbfd84aa780469e15be Review-Url: https://codereview.chromium.org/2471573005 Cr-Commit-Position: refs/heads/master@{#448509} Committed: https://chromium.googlesource.com/chromium/src/+/42407c7feb218491f72b05732fa83b4679144da4

Patch Set 1 #

Patch Set 2 : call OPM.unregisterOPMController() in PresentationFrame::Reset() #

Patch Set 3 : rebase #

Total comments: 5

Patch Set 4 : split renderer related changes into 4th patch #

Total comments: 14

Patch Set 5 : resolve code review comments from Mark #

Patch Set 6 : merge and refactor #

Total comments: 27

Patch Set 7 : resolve code review comments from Mark #

Patch Set 8 : merge with issue 2471263003 #

Total comments: 20

Patch Set 9 : resolve code review comments from Mark #

Total comments: 17

Patch Set 10 : add unit test for browser_presentation_connection_proxy #

Total comments: 34

Patch Set 11 : resolve code review comments from Derek #

Total comments: 6

Patch Set 12 : resolve code review comments from Derek #

Total comments: 6

Patch Set 13 : resolve code review comments from miu #

Patch Set 14 : merge with master #

Patch Set 15 : Fix PresentationDispatcherTest failures #

Total comments: 2

Patch Set 16 : merge with master and fix unit tests #

Patch Set 17 : fix presentation-reconnect.html crash #

Patch Set 18 : merge with master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+633 lines, -119 lines) Patch
M chrome/browser/extensions/api/tab_capture/offscreen_tab.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/media/router/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/media/router/browser_presentation_connection_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +76 lines, -0 lines 0 comments Download
A chrome/browser/media/router/browser_presentation_connection_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +94 lines, -0 lines 0 comments Download
A chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +116 lines, -0 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.h View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +112 lines, -26 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +24 lines, -4 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M content/browser/presentation/presentation_service_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -3 lines 0 comments Download
M content/public/browser/presentation_service_delegate.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/presentation/presentation_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +14 lines, -0 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 14 15 5 chunks +38 lines, -14 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +134 lines, -63 lines 0 comments Download
M content/renderer/presentation/test_presentation_connection.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/presentation/test_presentation_connection.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 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 13 14 15 16 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 75 (47 generated)
zhaobin
4 years, 1 month ago (2016-11-03 19:19:41 UTC) #3
mark a. foltz
Overall looks good, however, I'd like to finish crbug.com/632623 which has been on my plate ...
4 years, 1 month ago (2016-11-16 01:25:37 UTC) #4
zhaobin
Unifying message sending logic between 1-UA and 2-UA previous 1-UA (Send msg from controller/receiver to ...
4 years, 1 month ago (2016-11-23 01:29:25 UTC) #6
imcheng
Cool, it looks like with this flow the content side doesn't need to know whether ...
4 years ago (2016-11-29 00:33:22 UTC) #8
mark a. foltz
Overall looks okay. There are a lot of changes to the messaging flow in PSDImpl ...
4 years ago (2016-12-02 23:06:48 UTC) #9
zhaobin
https://codereview.chromium.org/2471573005/diff/100001/chrome/browser/media/router/browser_presentation_connection_proxy.cc File chrome/browser/media/router/browser_presentation_connection_proxy.cc (right): https://codereview.chromium.org/2471573005/diff/100001/chrome/browser/media/router/browser_presentation_connection_proxy.cc#newcode23 chrome/browser/media/router/browser_presentation_connection_proxy.cc:23: // set |data|, or size too large). On 2016/12/02 ...
3 years, 11 months ago (2017-01-13 00:05:49 UTC) #11
mark a. foltz
A few comments TBD: PresentationServiceDelegateImpl unittest https://codereview.chromium.org/2471573005/diff/160001/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc File chrome/browser/extensions/api/tab_capture/offscreen_tab.cc (right): https://codereview.chromium.org/2471573005/diff/160001/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc#newcode122 chrome/browser/extensions/api/tab_capture/offscreen_tab.cc:122: DVLOG(1) << " ...
3 years, 11 months ago (2017-01-23 22:29:35 UTC) #12
zhaobin
https://codereview.chromium.org/2471573005/diff/160001/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc File chrome/browser/extensions/api/tab_capture/offscreen_tab.cc (right): https://codereview.chromium.org/2471573005/diff/160001/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc#newcode122 chrome/browser/extensions/api/tab_capture/offscreen_tab.cc:122: DVLOG(1) << " Register with ReceiverPresentationServiceDelegateImpl, id=" On 2017/01/23 ...
3 years, 11 months ago (2017-01-24 19:28:46 UTC) #13
mark a. foltz
Overall looks good, a few comments. I didn't take a close look at the tests ...
3 years, 11 months ago (2017-01-27 00:44:22 UTC) #14
zhaobin
https://codereview.chromium.org/2471573005/diff/200001/chrome/browser/media/router/browser_presentation_connection_proxy.cc File chrome/browser/media/router/browser_presentation_connection_proxy.cc (right): https://codereview.chromium.org/2471573005/diff/200001/chrome/browser/media/router/browser_presentation_connection_proxy.cc#newcode16 chrome/browser/media/router/browser_presentation_connection_proxy.cc:16: GetPresentationConnectionMessage(blink::mojom::ConnectionMessagePtr input) { On 2017/01/27 00:44:21, mark a. foltz ...
3 years, 11 months ago (2017-01-27 05:05:46 UTC) #15
mark a. foltz
A few more comments, mostly minor style issues. Tests look good. Can you write a ...
3 years, 10 months ago (2017-01-27 18:30:06 UTC) #16
mark a. foltz
https://codereview.chromium.org/2471573005/diff/220001/chrome/browser/media/router/browser_presentation_connection_proxy.h File chrome/browser/media/router/browser_presentation_connection_proxy.h (right): https://codereview.chromium.org/2471573005/diff/220001/chrome/browser/media/router/browser_presentation_connection_proxy.h#newcode48 chrome/browser/media/router/browser_presentation_connection_proxy.h:48: void Bind(blink::mojom::PresentationConnectionRequest); On 2017/01/27 at 18:30:05, mark a. foltz ...
3 years, 10 months ago (2017-01-27 18:52:01 UTC) #17
zhaobin
https://codereview.chromium.org/2471573005/diff/220001/chrome/browser/media/router/browser_presentation_connection_proxy.cc File chrome/browser/media/router/browser_presentation_connection_proxy.cc (right): https://codereview.chromium.org/2471573005/diff/220001/chrome/browser/media/router/browser_presentation_connection_proxy.cc#newcode71 chrome/browser/media/router/browser_presentation_connection_proxy.cc:71: blink::mojom::PresentationConnectionRequest target_conn_request) { On 2017/01/27 18:30:05, mark a. foltz ...
3 years, 10 months ago (2017-01-27 22:11:40 UTC) #18
imcheng
https://codereview.chromium.org/2471573005/diff/240001/chrome/browser/media/router/browser_presentation_connection_proxy.cc File chrome/browser/media/router/browser_presentation_connection_proxy.cc (right): https://codereview.chromium.org/2471573005/diff/240001/chrome/browser/media/router/browser_presentation_connection_proxy.cc#newcode89 chrome/browser/media/router/browser_presentation_connection_proxy.cc:89: if (!router_) { Why would this be nullptr? Maybe ...
3 years, 10 months ago (2017-01-31 01:53:25 UTC) #20
zhaobin
https://codereview.chromium.org/2471573005/diff/240001/chrome/browser/media/router/browser_presentation_connection_proxy.cc File chrome/browser/media/router/browser_presentation_connection_proxy.cc (right): https://codereview.chromium.org/2471573005/diff/240001/chrome/browser/media/router/browser_presentation_connection_proxy.cc#newcode89 chrome/browser/media/router/browser_presentation_connection_proxy.cc:89: if (!router_) { On 2017/01/31 01:53:24, imcheng wrote: > ...
3 years, 10 months ago (2017-01-31 18:44:16 UTC) #21
imcheng
lgtm https://codereview.chromium.org/2471573005/diff/280001/chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc File chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc (right): https://codereview.chromium.org/2471573005/diff/280001/chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc#newcode21 chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc:21: class MockOnMessageCallback { This can be removed now ...
3 years, 10 months ago (2017-01-31 22:22:48 UTC) #22
zhaobin
+miu@ to review chrome/browser/extensions/api/tab_capture/offscreen_tab.cc +jam@ to review content/public/browser/presentation_service_delegate.h https://codereview.chromium.org/2471573005/diff/280001/chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc File chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc (right): https://codereview.chromium.org/2471573005/diff/280001/chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc#newcode21 chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc:21: class ...
3 years, 10 months ago (2017-02-01 04:16:09 UTC) #24
jam
lgtm
3 years, 10 months ago (2017-02-01 23:06:20 UTC) #25
miu
lgtm % a couple small things and one large thing to consider: https://codereview.chromium.org/2471573005/diff/300001/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc File chrome/browser/extensions/api/tab_capture/offscreen_tab.cc ...
3 years, 10 months ago (2017-02-02 21:17:35 UTC) #26
zhaobin
https://codereview.chromium.org/2471573005/diff/300001/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc File chrome/browser/extensions/api/tab_capture/offscreen_tab.cc (left): https://codereview.chromium.org/2471573005/diff/300001/chrome/browser/extensions/api/tab_capture/offscreen_tab.cc#oldcode121 chrome/browser/extensions/api/tab_capture/offscreen_tab.cc:121: // the PresentationRouter. http://crbug.com/513859 On 2017/02/02 21:17:34, miu wrote: ...
3 years, 10 months ago (2017-02-03 03:22:54 UTC) #30
mark a. foltz
LGTM Nice work :) A couple of minor changes will be needed to presentation_dispatcher to ...
3 years, 10 months ago (2017-02-04 00:07:24 UTC) #42
mark a. foltz
Just a reminder, review the patch description and make sure it fits the latest patchset ...
3 years, 10 months ago (2017-02-04 00:08:09 UTC) #43
zhaobin
https://codereview.chromium.org/2471573005/diff/380001/content/renderer/presentation/presentation_dispatcher.h File content/renderer/presentation/presentation_dispatcher.h (right): https://codereview.chromium.org/2471573005/diff/380001/content/renderer/presentation/presentation_dispatcher.h#newcode189 content/renderer/presentation/presentation_dispatcher.h:189: blink::mojom::PresentationSessionInfoPtr session_info, On 2017/02/04 00:07:24, mark a. foltz wrote: ...
3 years, 10 months ago (2017-02-06 17:53:01 UTC) #57
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/2471573005/400001
3 years, 10 months ago (2017-02-06 17:53:56 UTC) #60
commit-bot: I haz the power
Committed patchset #16 (id:400001) as https://chromium.googlesource.com/chromium/src/+/4b94a1fe3f58aacad2c46bbfd84aa780469e15be
3 years, 10 months ago (2017-02-06 18:01:03 UTC) #63
joedow
A revert of this CL (patchset #16 id:400001) has been created in https://codereview.chromium.org/2674273003/ by joedow@chromium.org. ...
3 years, 10 months ago (2017-02-06 19:13:28 UTC) #64
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/2471573005/440001
3 years, 10 months ago (2017-02-07 01:47:48 UTC) #72
commit-bot: I haz the power
3 years, 10 months ago (2017-02-07 02:06:12 UTC) #75
Message was sent while issue was closed.
Committed patchset #18 (id:440001) as
https://chromium.googlesource.com/chromium/src/+/42407c7feb218491f72b05732fa8...

Powered by Google App Engine
This is Rietveld 408576698