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

Issue 1971443002: Implement Audio Focus Manager for desktop. (Closed)

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

Description

Implement Audio Focus Manager for desktop. This CL implements a real Audio Focus Manager internal to Chrome. The intent is to use it on Chrome desktop, when there is no system audio focus manager. The Audio Focus Manager handles ducking and audio focus gain. At the moment, the rules are that only one entry can have audio focus and any transient will duck the audio focus entry. BUG=609503 Committed: https://crrev.com/ce42802dbc1e900b9d0689508b2f6284ee617a55 Cr-Commit-Position: refs/heads/master@{#406843}

Patch Set 1 #

Total comments: 3

Patch Set 2 : add some unit tests #

Patch Set 3 : rewrite witout tests #

Patch Set 4 : ready #

Total comments: 14

Patch Set 5 : style #

Total comments: 4

Patch Set 6 : review comments #

Patch Set 7 : rebase #

Patch Set 8 : fix leak in unit tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+587 lines, -8 lines) Patch
A content/browser/media/session/audio_focus_manager.h View 1 2 3 4 5 1 chunk +96 lines, -0 lines 0 comments Download
A content/browser/media/session/audio_focus_manager.cc View 1 2 3 4 5 1 chunk +127 lines, -0 lines 0 comments Download
A content/browser/media/session/audio_focus_manager_unittest.cc View 1 2 3 4 5 6 7 1 chunk +350 lines, -0 lines 0 comments Download
M content/browser/media/session/media_session.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/media/session/media_session_delegate_default.cc View 1 2 chunks +9 lines, -8 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 27 (13 generated)
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/1971443002/diff/1/content/browser/media/session/audio_focus_manager.cc File content/browser/media/session/audio_focus_manager.cc (right): https://codereview.chromium.org/1971443002/diff/1/content/browser/media/session/audio_focus_manager.cc#newcode22 content/browser/media/session/audio_focus_manager.cc:22: audio_focus_manager_(audio_focus_manager) { You forgot type_(type) here :) https://codereview.chromium.org/1971443002/diff/1/content/browser/media/session/audio_focus_manager.cc#newcode119 content/browser/media/session/audio_focus_manager.cc:119: ...
4 years, 7 months ago (2016-05-11 15:57:32 UTC) #3
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/1971443002/diff/1/content/browser/media/session/audio_focus_manager.cc File content/browser/media/session/audio_focus_manager.cc (right): https://codereview.chromium.org/1971443002/diff/1/content/browser/media/session/audio_focus_manager.cc#newcode119 content/browser/media/session/audio_focus_manager.cc:119: MediaSession::Get(*focus_stack_.begin())->Resume(MediaSession::SuspendType::SYSTEM); On 2016/05/11 15:57:32, Zhiqiang Zhang wrote: > On ...
4 years, 7 months ago (2016-05-20 14:14:44 UTC) #4
mlamouri (slow - plz ping)
Zhiqiang, this is ready to be reaviewed. PTAL :)
4 years, 5 months ago (2016-07-07 14:51:52 UTC) #6
Zhiqiang Zhang (Slow)
Some initial comments. I haven't looked much into the tests yet because I need to ...
4 years, 5 months ago (2016-07-07 16:04:25 UTC) #7
mlamouri (slow - plz ping)
Thanks for the comments. Answered the questions below. https://codereview.chromium.org/1971443002/diff/60001/content/browser/media/session/audio_focus_manager.cc File content/browser/media/session/audio_focus_manager.cc (right): https://codereview.chromium.org/1971443002/diff/60001/content/browser/media/session/audio_focus_manager.cc#newcode26 content/browser/media/session/audio_focus_manager.cc:26: AudioFocusManager::AudioFocusType ...
4 years, 5 months ago (2016-07-08 13:20:47 UTC) #8
Zhiqiang Zhang (Slow)
lgtm /w nits. https://codereview.chromium.org/1971443002/diff/80001/content/browser/media/session/audio_focus_manager.cc File content/browser/media/session/audio_focus_manager.cc (right): https://codereview.chromium.org/1971443002/diff/80001/content/browser/media/session/audio_focus_manager.cc#newcode86 content/browser/media/session/audio_focus_manager.cc:86: void AudioFocusManager::OnWebContentsDestroyed(WebContents* web_contents) { Nit: maybe ...
4 years, 5 months ago (2016-07-08 15:26:26 UTC) #9
mlamouri (slow - plz ping)
https://codereview.chromium.org/1971443002/diff/80001/content/browser/media/session/audio_focus_manager.cc File content/browser/media/session/audio_focus_manager.cc (right): https://codereview.chromium.org/1971443002/diff/80001/content/browser/media/session/audio_focus_manager.cc#newcode86 content/browser/media/session/audio_focus_manager.cc:86: void AudioFocusManager::OnWebContentsDestroyed(WebContents* web_contents) { On 2016/07/08 at 15:26:26, Zhiqiang ...
4 years, 5 months ago (2016-07-08 17:41:35 UTC) #10
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/1971443002/100001
4 years, 5 months ago (2016-07-08 17:42:36 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/256926)
4 years, 5 months ago (2016-07-08 18:40:12 UTC) #15
mlamouri (slow - plz ping)
The unit tests were leaking because the RenderProcessHost was doing things that were not expected ...
4 years, 5 months ago (2016-07-21 13:41:36 UTC) #20
mlamouri (slow - plz ping)
4 years, 5 months ago (2016-07-21 13:41:40 UTC) #22
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/1971443002/140001
4 years, 5 months ago (2016-07-21 13:41:57 UTC) #24
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 5 months ago (2016-07-21 14:22:10 UTC) #25
commit-bot: I haz the power
4 years, 5 months ago (2016-07-21 14:24:04 UTC) #27
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/ce42802dbc1e900b9d0689508b2f6284ee617a55
Cr-Commit-Position: refs/heads/master@{#406843}

Powered by Google App Engine
This is Rietveld 408576698