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

Issue 1131053005: [Presentation API] Convert screen availability API into Client style. (Closed)

Created:
5 years, 7 months ago by imcheng (use chromium acct)
Modified:
5 years, 7 months ago
Reviewers:
mark a. foltz, whywhat
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Presentation API] Convert screen availability API into Client style. Introduced a PresentationServiceClient mojo interface implemented by PresentationDispatcher. On connection to PresentationService, PDispatcher will pass a proxy of itself to PSImpl. Please note that screen availability updates are already throttled from the browser's perspective. When a screen availability update is available, it will be transmitted back to PSDispatcher via the PresentationServiceClient interface. In the future, I plan to use the same interface for other types of observer-style APIs (e.g. default session start, session state change, on message). Also, simplified the ScreenAvailability API so it only operates on the DPU (or 1-UA mode if absent). The current semantics to support listening on arbitrarily presentation URLs + handling behavior for DPU is very confusing. We should revisit the implementation when we decide to support it. This will also hopefully fix the bug where ScreenAvailability mojo callbacks accumulate over time. Also fix mojom indent. BUG=485337 Committed: https://crrev.com/9ce5394bf20f18b1413a214bef4548055c3bcb83 Cr-Commit-Position: refs/heads/master@{#329457}

Patch Set 1 : #

Total comments: 30

Patch Set 2 : Addressed 1st set comments #

Total comments: 2

Patch Set 3 : Addressed 2nd comments; change null checks #

Patch Set 4 : Rebase #

Patch Set 5 : Fix tests #

Patch Set 6 : Fix dcheck #

Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -531 lines) Patch
M content/browser/presentation/presentation_service_impl.h View 1 2 3 6 chunks +48 lines, -79 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.cc View 1 2 3 4 5 5 chunks +67 lines, -122 lines 0 comments Download
M content/browser/presentation/presentation_service_impl_unittest.cc View 1 2 3 12 chunks +53 lines, -208 lines 0 comments Download
M content/common/presentation/presentation_service.mojom View 1 2 3 1 chunk +89 lines, -86 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.h View 1 2 3 3 chunks +10 lines, -11 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.cc View 1 2 3 4 chunks +13 lines, -25 lines 0 comments Download

Messages

Total messages: 18 (4 generated)
imcheng (use chromium acct)
PTAL
5 years, 7 months ago (2015-05-08 22:07:34 UTC) #3
mark a. foltz
Overall looks good, just a few questions about the organization of various interfaces. https://codereview.chromium.org/1131053005/diff/20001/content/browser/presentation/presentation_service_impl.cc File ...
5 years, 7 months ago (2015-05-09 07:01:32 UTC) #4
whywhat
lgtm re the simpler approach could you expand a little more on the throttling of ...
5 years, 7 months ago (2015-05-11 17:58:19 UTC) #5
imcheng (use chromium acct)
On 2015/05/11 17:58:19, whywhat wrote: > lgtm re the simpler approach > > could you ...
5 years, 7 months ago (2015-05-11 22:01:39 UTC) #6
imcheng (use chromium acct)
https://codereview.chromium.org/1131053005/diff/20001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1131053005/diff/20001/content/browser/presentation/presentation_service_impl.cc#newcode106 content/browser/presentation/presentation_service_impl.cc:106: client_ = client.Pass(); On 2015/05/09 07:01:32, mark a. foltz ...
5 years, 7 months ago (2015-05-11 22:01:54 UTC) #7
imcheng (use chromium acct)
https://codereview.chromium.org/1131053005/diff/20001/content/renderer/presentation/presentation_dispatcher.cc File content/renderer/presentation/presentation_dispatcher.cc (right): https://codereview.chromium.org/1131053005/diff/20001/content/renderer/presentation/presentation_dispatcher.cc#newcode86 content/renderer/presentation/presentation_dispatcher.cc:86: } else { On 2015/05/11 17:58:19, whywhat wrote: > ...
5 years, 7 months ago (2015-05-11 22:04:13 UTC) #8
mark a. foltz
lgtm https://codereview.chromium.org/1131053005/diff/20001/content/browser/presentation/presentation_service_impl.h File content/browser/presentation/presentation_service_impl.h (right): https://codereview.chromium.org/1131053005/diff/20001/content/browser/presentation/presentation_service_impl.h#newcode170 content/browser/presentation/presentation_service_impl.h:170: void ListenForScreenAvailability() override; On 2015/05/11 22:01:54, imcheng wrote: ...
5 years, 7 months ago (2015-05-11 23:48:38 UTC) #9
imcheng (use chromium acct)
https://codereview.chromium.org/1131053005/diff/40001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/1131053005/diff/40001/content/browser/presentation/presentation_service_impl.cc#newcode115 content/browser/presentation/presentation_service_impl.cc:115: if (screen_availability_listener_.get() && On 2015/05/11 23:48:38, mark a. foltz ...
5 years, 7 months ago (2015-05-12 00:14:03 UTC) #10
whywhat
On 2015/05/11 at 22:01:39, imcheng wrote: > On 2015/05/11 17:58:19, whywhat wrote: > > lgtm ...
5 years, 7 months ago (2015-05-12 10:48:14 UTC) #11
imcheng (use chromium acct)
On 2015/05/12 10:48:14, whywhat wrote: > On 2015/05/11 at 22:01:39, imcheng wrote: > > On ...
5 years, 7 months ago (2015-05-12 17:59:27 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1131053005/120001
5 years, 7 months ago (2015-05-12 18:00:46 UTC) #15
whywhat
On 2015/05/12 at 17:59:27, imcheng wrote: > On 2015/05/12 10:48:14, whywhat wrote: > > On ...
5 years, 7 months ago (2015-05-12 18:01:59 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:120001)
5 years, 7 months ago (2015-05-12 19:27:14 UTC) #17
commit-bot: I haz the power
5 years, 7 months ago (2015-05-12 19:28:30 UTC) #18
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/9ce5394bf20f18b1413a214bef4548055c3bcb83
Cr-Commit-Position: refs/heads/master@{#329457}

Powered by Google App Engine
This is Rietveld 408576698