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

Issue 2274873003: Letting Flash join MediaSession (stack implementaion) (Closed)

Created:
4 years, 3 months ago by Zhiqiang Zhang (Slow)
Modified:
4 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@media_session_type
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Letting Flash join MediaSession (stack implementaion) This CL lets Flash join and be managed by MediaSession. Flash will take "Gain" audio focus, and sessions with Flash will duck instead of being suspended. Test flags: --enable-default-media-session --ppapi-flash-path=/opt/google/chrome/PepperFlash/libpepflashplayer.so --enable-features=flash-join-media-session Test URL (can open multiple tabs and try): http://xxyzzzq.github.io/sandbox/media-session/flash-test.html BUG=619084 Committed: https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d Cr-Commit-Position: refs/heads/master@{#422087}

Patch Set 1 #

Patch Set 2 : no focus regain, unduck pepper when on top #

Patch Set 3 : fixed bugs, seems working #

Patch Set 4 : fixed unduck bug #

Total comments: 17

Patch Set 5 : rebased #

Total comments: 16

Patch Set 6 : tuned some behavior details and addressed Anton's comments (Left some comments here) #

Total comments: 2

Patch Set 7 : fixed existing tests (need new tests when behavior is decided) #

Total comments: 23

Patch Set 8 : rebased and addressed Anton's comments #

Patch Set 9 : added doc #

Total comments: 26

Patch Set 10 : addressed Anton's comments #

Total comments: 22

Patch Set 11 : Addressed Mounir's comments #

Total comments: 2

Patch Set 12 : addressed jochen's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+419 lines, -233 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/media/session/audio_focus_manager.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -52 lines 0 comments Download
M content/browser/media/session/audio_focus_manager.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +55 lines, -77 lines 0 comments Download
M content/browser/media/session/audio_focus_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 14 chunks +167 lines, -78 lines 0 comments Download
M content/browser/media/session/media_session.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +26 lines, -11 lines 0 comments Download
M content/browser/media/session/media_session.cc View 1 2 3 4 5 6 7 8 9 10 14 chunks +64 lines, -14 lines 0 comments Download
M content/browser/media/session/media_session_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
A docs/audio_focus.md View 1 2 3 4 5 6 7 8 9 10 1 chunk +98 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (21 generated)
Zhiqiang Zhang (Slow)
Hi Mounir, This is the implementation of my proposal in email. Just need some initial ...
4 years, 3 months ago (2016-08-25 16:50:00 UTC) #3
mlamouri (slow - plz ping)
I will unlikely have time to look at this today and will be out for ...
4 years, 3 months ago (2016-08-26 17:11:38 UTC) #6
whywhat
I think the stack and MediaSession logic would benefit from an extensive comment somewhere in ...
4 years, 3 months ago (2016-08-30 21:09:38 UTC) #7
Zhiqiang Zhang (Slow)
Just some initial replies. I haven't addressed the nits but will do that later. https://codereview.chromium.org/2274873003/diff/60001/content/browser/media/session/audio_focus_manager.h ...
4 years, 3 months ago (2016-08-31 14:37:34 UTC) #8
whywhat
https://codereview.chromium.org/2274873003/diff/60001/content/browser/media/session/audio_focus_manager.h File content/browser/media/session/audio_focus_manager.h (right): https://codereview.chromium.org/2274873003/diff/60001/content/browser/media/session/audio_focus_manager.h#newcode66 content/browser/media/session/audio_focus_manager.h:66: std::list<std::unique_ptr<AudioFocusEntry>> audio_focus_stack_; On 2016/08/31 at 14:37:34, Zhiqiang Zhang wrote: ...
4 years, 3 months ago (2016-08-31 18:37:09 UTC) #9
Zhiqiang Zhang (Slow)
On 2016/08/31 18:37:09, whywhat wrote: > https://codereview.chromium.org/2274873003/diff/60001/content/browser/media/session/audio_focus_manager.h > File content/browser/media/session/audio_focus_manager.h (right): > > https://codereview.chromium.org/2274873003/diff/60001/content/browser/media/session/audio_focus_manager.h#newcode66 > ...
4 years, 3 months ago (2016-08-31 18:58:32 UTC) #10
mlamouri (slow - plz ping)
https://codereview.chromium.org/2274873003/diff/80001/content/browser/media/session/media_session.h File content/browser/media/session/media_session.h (right): https://codereview.chromium.org/2274873003/diff/80001/content/browser/media/session/media_session.h#newcode66 content/browser/media/session/media_session.h:66: void WasShown() override; To simplify understanding this, can you ...
4 years, 3 months ago (2016-09-05 09:40:36 UTC) #11
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2274873003/diff/80001/content/browser/media/session/media_session.h File content/browser/media/session/media_session.h (right): https://codereview.chromium.org/2274873003/diff/80001/content/browser/media/session/media_session.h#newcode66 content/browser/media/session/media_session.h:66: void WasShown() override; On 2016/09/05 09:40:36, mlamouri (slow) wrote: ...
4 years, 3 months ago (2016-09-05 09:54:21 UTC) #12
whywhat
https://codereview.chromium.org/2274873003/diff/80001/content/browser/media/session/audio_focus_manager.cc File content/browser/media/session/audio_focus_manager.cc (right): https://codereview.chromium.org/2274873003/diff/80001/content/browser/media/session/audio_focus_manager.cc#newcode41 content/browser/media/session/audio_focus_manager.cc:41: audio_focus_stack_.back()->web_contents() == web_contents) nit: use {} as the condition ...
4 years, 3 months ago (2016-09-07 20:09:54 UTC) #13
mlamouri (slow - plz ping)
I will let avayvod@ review this. Let me know if you want me to have ...
4 years, 3 months ago (2016-09-08 10:02:51 UTC) #14
Zhiqiang Zhang (Slow)
PTAL. Tweaked some Pepper-related logic and addressed Anton's comments. The main idea is as follows: ...
4 years, 3 months ago (2016-09-08 14:18:26 UTC) #16
Zhiqiang Zhang (Slow)
Anton, PTAL when you have some free time :)
4 years, 3 months ago (2016-09-12 15:33:36 UTC) #18
whywhat
Better, I think we could encapsulate pepper within media session and simplify/unify some code before ...
4 years, 3 months ago (2016-09-13 00:16:17 UTC) #19
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2274873003/diff/140001/content/browser/media/session/audio_focus_manager.cc File content/browser/media/session/audio_focus_manager.cc (right): https://codereview.chromium.org/2274873003/diff/140001/content/browser/media/session/audio_focus_manager.cc#newcode88 content/browser/media/session/audio_focus_manager.cc:88: // Allow the top-most MediaSession having Pepper to unduck ...
4 years, 3 months ago (2016-09-14 19:30:19 UTC) #20
whywhat
On 2016/09/14 at 19:30:19, zqzhang wrote: > https://codereview.chromium.org/2274873003/diff/140001/content/browser/media/session/audio_focus_manager.cc > File content/browser/media/session/audio_focus_manager.cc (right): > > https://codereview.chromium.org/2274873003/diff/140001/content/browser/media/session/audio_focus_manager.cc#newcode88 ...
4 years, 3 months ago (2016-09-14 22:44:13 UTC) #21
Zhiqiang Zhang (Slow)
PTAL. Addressed Anton's comments w/ replies. Major changes: * Removed Pepper-specific ducking logic Allow/DisallowPepperOverride ducking. ...
4 years, 3 months ago (2016-09-22 12:30:33 UTC) #22
Zhiqiang Zhang (Slow)
Friendly ping ;)
4 years, 2 months ago (2016-09-26 18:35:19 UTC) #23
whywhat
I still believe AFM shouldn't know about pepper at all. https://codereview.chromium.org/2274873003/diff/140001/content/browser/media/session/audio_focus_manager.cc File content/browser/media/session/audio_focus_manager.cc (right): https://codereview.chromium.org/2274873003/diff/140001/content/browser/media/session/audio_focus_manager.cc#newcode68 ...
4 years, 2 months ago (2016-09-27 17:54:17 UTC) #24
Zhiqiang Zhang (Slow)
PTAL. Addressed Anton's comments. Major changes: * Totally removed AudioFocusEntry, and store MediaSession* in AudioFocusManager ...
4 years, 2 months ago (2016-09-28 16:12:18 UTC) #26
whywhat
lgtm https://codereview.chromium.org/2274873003/diff/180001/docs/audio_focus.md File docs/audio_focus.md (right): https://codereview.chromium.org/2274873003/diff/180001/docs/audio_focus.md#newcode64 docs/audio_focus.md:64: * If the next top entry is persistent, ...
4 years, 2 months ago (2016-09-29 22:40:47 UTC) #27
mlamouri (slow - plz ping)
Can you link to a BUG=? :) lgtm with comments otherwise https://codereview.chromium.org/2274873003/diff/220001/content/browser/media/session/audio_focus_manager.cc File content/browser/media/session/audio_focus_manager.cc (right): ...
4 years, 2 months ago (2016-09-30 09:35:23 UTC) #32
Zhiqiang Zhang (Slow)
+jochen for rubber-stamping changes in content/*/BUILD.gn https://codereview.chromium.org/2274873003/diff/220001/content/browser/media/session/audio_focus_manager.cc File content/browser/media/session/audio_focus_manager.cc (right): https://codereview.chromium.org/2274873003/diff/220001/content/browser/media/session/audio_focus_manager.cc#newcode71 content/browser/media/session/audio_focus_manager.cc:71: if ((*iter)->HasPepper()) { ...
4 years, 2 months ago (2016-09-30 10:04:43 UTC) #34
jochen (gone - plz use gerrit)
lgtm with comment https://codereview.chromium.org/2274873003/diff/240001/content/browser/BUILD.gn File content/browser/BUILD.gn (right): https://codereview.chromium.org/2274873003/diff/240001/content/browser/BUILD.gn#newcode1729 content/browser/BUILD.gn:1729: "media/session/audio_focus_manager.cc", please also remove the header
4 years, 2 months ago (2016-09-30 10:46:06 UTC) #38
Zhiqiang Zhang (Slow)
\o/ https://codereview.chromium.org/2274873003/diff/240001/content/browser/BUILD.gn File content/browser/BUILD.gn (right): https://codereview.chromium.org/2274873003/diff/240001/content/browser/BUILD.gn#newcode1729 content/browser/BUILD.gn:1729: "media/session/audio_focus_manager.cc", On 2016/09/30 10:46:06, jochen (slow) wrote: > ...
4 years, 2 months ago (2016-09-30 11:34:17 UTC) #41
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/2274873003/260001
4 years, 2 months ago (2016-09-30 11:34:38 UTC) #44
commit-bot: I haz the power
Committed patchset #12 (id:260001)
4 years, 2 months ago (2016-09-30 12:27:34 UTC) #46
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/bc67624f3ea12ffabfb129c269c7bd82c9a1127d Cr-Commit-Position: refs/heads/master@{#422087}
4 years, 2 months ago (2016-09-30 12:29:50 UTC) #48
findit-for-me
FYI: Findit identified this CL at revision 422087 as the culprit for failures in the ...
4 years, 2 months ago (2016-09-30 13:25:01 UTC) #49
wjmaclean
4 years, 2 months ago (2016-09-30 13:28:54 UTC) #50
Message was sent while issue was closed.
A revert of this CL (patchset #12 id:260001) has been created in
https://codereview.chromium.org/2382723006/ by wjmaclean@chromium.org.

The reason for reverting is: This appears to be causing failures of:

AudioFocusManagerTest.PepperRequestsGainFocus
AudioFocusManagerTest.AbandoningGainFocusRevokesTopMostPepperSession
AudioFocusManagerTest.GainDucksPepper

on

Linux ChromiumOS Tests (1)
Cast Linux 
.

Powered by Google App Engine
This is Rietveld 408576698