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

Issue 2477573002: [Presentation API] (3rd) (1-UA) Split PresentationServiceDelegateImpl(PSDImpl) (Closed)

Created:
4 years, 1 month ago by zhaobin
Modified:
3 years, 11 months ago
CC:
Aaron Boodman, abarth-chromium, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, feature-media-reviews_chromium.org, media-router+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Presentation API] (1-UA) Split PresentationServiceDelegateImpl(PSDImpl) into ControllerPSDImpl and ReceiverPSDImpl (Splitting of https://codereview.chromium.org/2379703002/) In an offscreen presentation, we have controlling frame (page that starts a PresentationRequest with url) and receiver frame (page corresponding to the url, rendered as offscreen tab). They talk to MR extension and OffscreenPresentationManager (OPM) in different ways. It makes sense to split them. - create ReceiverPSDImpl class - PresentationServiceImpl (PSImpl) class takes controller_delegate_ and receiver_delegate_ objects. For controlling frame, receiver_delegate_ = nullptr; For receiver frame controller_delegate_ = nullptr - Added PSImpl::SetPresentationConnection() - will be called in PresentationDispatcher::OnSessionCreated(), PresentationDispatcher::OnReceiverConnectionAvailable(); will call OPM::RegisterOffscreenPresentationController() - Added PSImpl::OnReceiverConnectionAvailable() - will be registered to OPM as receiver callback PSImpl.receiver_delegate_ is always nullptr now (make sure things wont break). It will be set in offscreen_tab.cc in next CL. 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/2477573002 Cr-Commit-Position: refs/heads/master@{#443176} Committed: https://chromium.googlesource.com/chromium/src/+/f3704f8df76be0e5c250db90c9faaf8eddea709f

Patch Set 1 #

Total comments: 54

Patch Set 2 : resolve code review comments from Mark #

Patch Set 3 : rebase #

Patch Set 4 : rebase #

Total comments: 47

Patch Set 5 : resolve code review comments from Mark #

Total comments: 10

Patch Set 6 : rebase #

Patch Set 7 : resolve code review comments from Derek #

Total comments: 11

Patch Set 8 : resolve code review comments from Mark #

Patch Set 9 : merge with master #

Total comments: 2

Patch Set 10 : resolve code review comments from jam #

Total comments: 8

Patch Set 11 : rebase with master and resolve merge conflicts #

Patch Set 12 : resolve code review comments from dcheng #

Total comments: 6

Patch Set 13 : resolve code review comments from dcheng #

Total comments: 2

Patch Set 14 : resolve code review comments from Mark #

Patch Set 15 : rebase #

Patch Set 16 : fix windows compile error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+840 lines, -178 lines) Patch
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +22 lines, -3 lines 0 comments Download
M chrome/browser/media/router/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/media/router/offscreen_presentation_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +66 lines, -51 lines 0 comments Download
M chrome/browser/media/router/offscreen_presentation_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +26 lines, -8 lines 0 comments Download
M chrome/browser/media/router/offscreen_presentation_manager_factory.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/media/router/offscreen_presentation_manager_factory.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/media/router/offscreen_presentation_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +10 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 14 8 chunks +23 lines, -31 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 11 12 13 14 4 chunks +64 lines, -0 lines 0 comments Download
A chrome/browser/media/router/presentation_service_delegate_observers.h View 1 2 3 4 5 6 7 8 9 1 chunk +41 lines, -0 lines 0 comments Download
A chrome/browser/media/router/presentation_service_delegate_observers.cc View 1 2 3 4 5 6 7 8 9 1 chunk +31 lines, -0 lines 0 comments Download
A chrome/browser/media/router/receiver_presentation_service_delegate_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +76 lines, -0 lines 0 comments Download
A chrome/browser/media/router/receiver_presentation_service_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +74 lines, -0 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +38 lines, -6 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 18 chunks +97 lines, -39 lines 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 8 chunks +114 lines, -7 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +12 lines, -4 lines 0 comments Download
M content/public/browser/content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -2 lines 0 comments Download
M content/public/browser/presentation_service_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +55 lines, -12 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M content/renderer/presentation/presentation_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M content/renderer/presentation/presentation_dispatcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/presentation/presentation.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +37 lines, -5 lines 0 comments Download

Messages

Total messages: 45 (22 generated)
zhaobin
4 years, 1 month ago (2016-11-03 18:40:38 UTC) #4
mark a. foltz
Mostly minor comments on style and documentation. I had a couple of suggestions on the ...
4 years, 1 month ago (2016-11-08 23:40:52 UTC) #5
zhaobin
https://codereview.chromium.org/2477573002/diff/20001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2477573002/diff/20001/chrome/browser/chrome_content_browser_client.cc#newcode3073 chrome/browser/chrome_content_browser_client.cc:3073: if (media_router::MediaRouterEnabled(web_contents->GetBrowserContext())) { On 2016/11/08 23:40:51, mark a. foltz ...
4 years, 1 month ago (2016-11-10 04:14:01 UTC) #6
mark a. foltz
One more round, mostly cleaning up includes and a few minor fixes. https://codereview.chromium.org/2477573002/diff/80001/chrome/browser/media/router/offscreen_presentation_manager_factory.h File chrome/browser/media/router/offscreen_presentation_manager_factory.h ...
4 years, 1 month ago (2016-11-15 23:41:47 UTC) #7
mark a. foltz
> https://codereview.chromium.org/2477573002/diff/80001/content/browser/presentation/presentation_service_impl.cc > File content/browser/presentation/presentation_service_impl.cc (right): > > https://codereview.chromium.org/2477573002/diff/80001/content/browser/presentation/presentation_service_impl.cc#newcode475 > content/browser/presentation/presentation_service_impl.cc:475: ? static_cast<PresentationServiceDelegateBase*>(receiver_delegate_) > You ...
4 years, 1 month ago (2016-11-15 23:43:42 UTC) #8
zhaobin
https://codereview.chromium.org/2477573002/diff/80001/chrome/browser/media/router/offscreen_presentation_manager_factory.h File chrome/browser/media/router/offscreen_presentation_manager_factory.h (right): https://codereview.chromium.org/2477573002/diff/80001/chrome/browser/media/router/offscreen_presentation_manager_factory.h#newcode33 chrome/browser/media/router/offscreen_presentation_manager_factory.h:33: static OffscreenPresentationManagerFactory* GetInstance(); On 2016/11/15 23:41:46, mark a. foltz ...
4 years, 1 month ago (2016-11-16 18:02:42 UTC) #9
imcheng
Looks like this patch will need to be updated with the new design in 5th ...
4 years ago (2016-11-29 00:39:01 UTC) #10
zhaobin
https://codereview.chromium.org/2477573002/diff/100001/chrome/browser/media/router/offscreen_presentation_manager_factory.h File chrome/browser/media/router/offscreen_presentation_manager_factory.h (right): https://codereview.chromium.org/2477573002/diff/100001/chrome/browser/media/router/offscreen_presentation_manager_factory.h#newcode32 chrome/browser/media/router/offscreen_presentation_manager_factory.h:32: // For test use only On 2016/11/29 00:39:01, imcheng ...
4 years ago (2016-11-29 23:22:33 UTC) #11
mark a. foltz
LGTM with comments addressed Nice work! Make sure the patch description is up to date ...
4 years ago (2016-12-02 22:09:05 UTC) #12
zhaobin
https://codereview.chromium.org/2477573002/diff/140001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2477573002/diff/140001/chrome/browser/chrome_content_browser_client.cc#newcode3128 chrome/browser/chrome_content_browser_client.cc:3128: if (web_contents->GetBrowserContext()->IsOffTheRecord()) On 2016/12/02 22:09:05, mark a. foltz wrote: ...
4 years ago (2016-12-03 00:34:26 UTC) #13
zhaobin
+dcheng for mojo related changes; +jam for content related changes.
4 years ago (2016-12-13 22:15:39 UTC) #16
jam
https://codereview.chromium.org/2477573002/diff/200001/content/public/browser/presentation_service_delegate.h File content/public/browser/presentation_service_delegate.h (right): https://codereview.chromium.org/2477573002/diff/200001/content/public/browser/presentation_service_delegate.h#newcode101 content/public/browser/presentation_service_delegate.h:101: std::map<RenderFrameHostID, Observer*> observers_; this is against the content api ...
4 years ago (2016-12-14 17:48:23 UTC) #17
zhaobin
https://codereview.chromium.org/2477573002/diff/200001/content/public/browser/presentation_service_delegate.h File content/public/browser/presentation_service_delegate.h (right): https://codereview.chromium.org/2477573002/diff/200001/content/public/browser/presentation_service_delegate.h#newcode101 content/public/browser/presentation_service_delegate.h:101: std::map<RenderFrameHostID, Observer*> observers_; On 2016/12/14 17:48:23, jam wrote: > ...
4 years ago (2016-12-15 02:55:59 UTC) #18
jam
lgtm for content files outside media/presentation and chrome
4 years ago (2016-12-19 18:24:17 UTC) #19
dcheng
https://codereview.chromium.org/2477573002/diff/220001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2477573002/diff/220001/chrome/browser/chrome_content_browser_client.cc#newcode3160 chrome/browser/chrome_content_browser_client.cc:3160: if (impl && web_contents->GetBrowserContext()->IsOffTheRecord()) I would expect the IsOffTheRecord() ...
3 years, 11 months ago (2017-01-06 11:54:22 UTC) #20
zhaobin
Removed SetTargetConnection() from PresentationConnection mojo interface according to dcheng's suggestion. Will update 4th and 5th ...
3 years, 11 months ago (2017-01-10 01:39:17 UTC) #22
dcheng
https://codereview.chromium.org/2477573002/diff/220001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2477573002/diff/220001/chrome/browser/chrome_content_browser_client.cc#newcode3160 chrome/browser/chrome_content_browser_client.cc:3160: if (impl && web_contents->GetBrowserContext()->IsOffTheRecord()) On 2017/01/10 01:39:17, zhaobin wrote: ...
3 years, 11 months ago (2017-01-10 06:46:59 UTC) #23
zhaobin
https://codereview.chromium.org/2477573002/diff/220001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2477573002/diff/220001/chrome/browser/chrome_content_browser_client.cc#newcode3160 chrome/browser/chrome_content_browser_client.cc:3160: if (impl && web_contents->GetBrowserContext()->IsOffTheRecord()) On 2017/01/10 06:46:58, dcheng wrote: ...
3 years, 11 months ago (2017-01-10 21:49:54 UTC) #24
mark a. foltz
https://codereview.chromium.org/2477573002/diff/220001/third_party/WebKit/public/platform/modules/presentation/presentation.mojom File third_party/WebKit/public/platform/modules/presentation/presentation.mojom (right): https://codereview.chromium.org/2477573002/diff/220001/third_party/WebKit/public/platform/modules/presentation/presentation.mojom#newcode111 third_party/WebKit/public/platform/modules/presentation/presentation.mojom:111: PresentationConnection connection); On 2017/01/06 at 11:54:22, dcheng wrote: > ...
3 years, 11 months ago (2017-01-10 23:05:34 UTC) #25
zhaobin
https://codereview.chromium.org/2477573002/diff/300001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2477573002/diff/300001/chrome/browser/chrome_content_browser_client.cc#newcode3163 chrome/browser/chrome_content_browser_client.cc:3163: DCHECK(web_contents->GetBrowserContext()->IsOffTheRecord()); On 2017/01/10 23:05:34, mark a. foltz wrote: > ...
3 years, 11 months ago (2017-01-11 03:13:37 UTC) #26
dcheng
mojo lgtm https://codereview.chromium.org/2477573002/diff/220001/third_party/WebKit/public/platform/modules/presentation/presentation.mojom File third_party/WebKit/public/platform/modules/presentation/presentation.mojom (right): https://codereview.chromium.org/2477573002/diff/220001/third_party/WebKit/public/platform/modules/presentation/presentation.mojom#newcode111 third_party/WebKit/public/platform/modules/presentation/presentation.mojom:111: PresentationConnection connection); On 2017/01/10 23:05:33, mark a. ...
3 years, 11 months ago (2017-01-11 09:22:18 UTC) #27
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/2477573002/360001
3 years, 11 months ago (2017-01-12 07:15:31 UTC) #42
commit-bot: I haz the power
3 years, 11 months ago (2017-01-12 07:20:16 UTC) #45
Message was sent while issue was closed.
Committed patchset #16 (id:360001) as
https://chromium.googlesource.com/chromium/src/+/f3704f8df76be0e5c250db90c9fa...

Powered by Google App Engine
This is Rietveld 408576698