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

Issue 2949053002: [Presentation API] OffscreenPresentationManager should only interact with top level receiver frame (Closed)

Created:
3 years, 6 months ago by zhaobin
Modified:
3 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, mfoltz+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Presentation API] OffscreenPresentationManager should only interact with top level receiver frame When receiver page has sub frames, all frames will try to register receiver callbacks to OPM with the same presentation_id, triggering DCHECK failure. Also any frame reset will end offscreen presentation. According to https://github.com/w3c/presentation-api/issues/367, only top level frame matters. This patch adds a is_main_frame_ flag to PresentationServiceImpl to indicate top level frame. BUG=734798 Review-Url: https://codereview.chromium.org/2949053002 Cr-Commit-Position: refs/heads/master@{#483436} Committed: https://chromium.googlesource.com/chromium/src/+/dca98f635b5337b08df7a3d9480800adfeaba4c5

Patch Set 1 #

Patch Set 2 : resolve code review comments from ncarter #

Total comments: 3

Patch Set 3 : resolve code review comments from ncarter #

Patch Set 4 : add unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -10 lines) Patch
M content/browser/presentation/presentation_service_impl.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.cc View 1 2 3 chunks +10 lines, -5 lines 0 comments Download
M content/browser/presentation/presentation_service_impl_unittest.cc View 1 2 3 2 chunks +29 lines, -5 lines 0 comments Download

Messages

Total messages: 29 (18 generated)
zhaobin
3 years, 6 months ago (2017-06-21 18:25:46 UTC) #2
imcheng
lgtm Looks like a ok fix. We can potentially use the same logic for SetDefaultPresentationUrls ...
3 years, 6 months ago (2017-06-21 21:45:17 UTC) #3
zhaobin
Talked to ncarter@ and he says GetMainFrame() usage seems fine here.
3 years, 6 months ago (2017-06-23 18:57:33 UTC) #5
ncarter (slow)
https://codereview.chromium.org/2949053002/diff/20001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/2949053002/diff/20001/content/browser/presentation/presentation_service_impl.cc#newcode65 content/browser/presentation/presentation_service_impl.cc:65: is_main_frame_ = rfh_impl->frame_tree_node()->IsMainFrame(); I forgot -- you can do ...
3 years, 6 months ago (2017-06-23 19:49:01 UTC) #6
ncarter (slow)
https://codereview.chromium.org/2949053002/diff/20001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/2949053002/diff/20001/content/browser/presentation/presentation_service_impl.cc#newcode65 content/browser/presentation/presentation_service_impl.cc:65: is_main_frame_ = rfh_impl->frame_tree_node()->IsMainFrame(); On 2017/06/23 19:49:01, ncarter (slow) wrote: ...
3 years, 6 months ago (2017-06-23 19:49:34 UTC) #7
zhaobin
https://codereview.chromium.org/2949053002/diff/20001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/2949053002/diff/20001/content/browser/presentation/presentation_service_impl.cc#newcode65 content/browser/presentation/presentation_service_impl.cc:65: is_main_frame_ = rfh_impl->frame_tree_node()->IsMainFrame(); On 2017/06/23 19:49:01, ncarter (slow) wrote: ...
3 years, 6 months ago (2017-06-23 21:34:12 UTC) #8
imcheng
lgtm Thanks Nick!
3 years, 6 months ago (2017-06-23 23:11:02 UTC) #13
mark a. foltz
LGTM Can this behavior be unit tested?
3 years, 5 months ago (2017-06-26 23:00:08 UTC) #14
zhaobin
On 2017/06/26 23:00:08, mark a. foltz wrote: > LGTM > > Can this behavior be ...
3 years, 5 months ago (2017-06-27 21:14:23 UTC) #15
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/2949053002/60001
3 years, 5 months ago (2017-06-29 17:37:21 UTC) #26
commit-bot: I haz the power
3 years, 5 months ago (2017-06-29 18:42:51 UTC) #29
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/dca98f635b5337b08df7a3d94808...

Powered by Google App Engine
This is Rietveld 408576698