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

Issue 562273008: Add audio signal to the ResourceScheduler. (Closed)

Created:
6 years, 3 months ago by aiolos (Not reviewing)
Modified:
6 years, 2 months ago
Reviewers:
jam, DaleCurtis, mmenke
CC:
chromium-reviews, posciak+watch_chromium.org, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add audio signal to the ResourceScheduler. BUG=128035 Committed: https://crrev.com/6e7ce491a74481f8e3d7293ebb0ae58d62564526 Cr-Commit-Position: refs/heads/master@{#299029}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressed comments. #

Total comments: 4

Patch Set 3 : Use render_view level HasActiveAudio instead of process level. #

Total comments: 8

Patch Set 4 : nits from Dale. #

Total comments: 9

Patch Set 5 : Nits from Matt #

Total comments: 13

Patch Set 6 : Fix trybot error. #

Total comments: 3

Patch Set 7 : Fixed error, added start state and updated unittests. #

Patch Set 8 : Rebase #

Patch Set 9 : Fix. #

Total comments: 2

Patch Set 10 : #

Patch Set 11 : Dale comment. #

Total comments: 6

Patch Set 12 : Change for Testing #

Patch Set 13 : Rebase #

Total comments: 3

Patch Set 14 : More Dale comments. #

Patch Set 15 : Use bool instead of null pointer. #

Patch Set 16 : Set playing to correct value. #

Patch Set 17 : Must still check for NULL AudioRenderHost #

Total comments: 1

Patch Set 18 : Naming nit. #

Total comments: 1

Patch Set 19 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -90 lines) Patch
M content/browser/loader/resource_dispatcher_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +9 lines, -1 line 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +12 lines, -5 lines 0 comments Download
M content/browser/loader/resource_scheduler.h View 1 2 3 4 5 6 3 chunks +7 lines, -4 lines 0 comments Download
M content/browser/loader/resource_scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +21 lines, -17 lines 0 comments Download
M content/browser/loader/resource_scheduler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 chunks +54 lines, -34 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +43 lines, -14 lines 0 comments Download
M content/browser/renderer_host/render_view_host_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +8 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +8 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +16 lines, -4 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 58 (3 generated)
aiolos (Not reviewing)
I considered putting the hook for this into the AudioStreamMonitor itself, but was wary of ...
6 years, 3 months ago (2014-09-18 01:13:25 UTC) #2
mmenke
https://codereview.chromium.org/562273008/diff/1/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/1/content/browser/renderer_host/media/audio_renderer_host.cc#newcode282 content/browser/renderer_host/media/audio_renderer_host.cc:282: if (entry->playing() != is_playing) { Suggest making a method: ...
6 years, 3 months ago (2014-09-18 14:12:42 UTC) #3
DaleCurtis
cc: miu. The more I think about it, the less I think the AudioStreamMonitor is ...
6 years, 3 months ago (2014-09-18 17:51:24 UTC) #4
aiolos (Not reviewing)
On 2014/09/18 17:51:24, DaleCurtis wrote: > cc: miu. > > The more I think about ...
6 years, 3 months ago (2014-09-18 20:30:59 UTC) #5
DaleCurtis
On 2014/09/18 20:30:59, aiolos wrote: > On 2014/09/18 17:51:24, DaleCurtis wrote: > > cc: miu. ...
6 years, 3 months ago (2014-09-18 20:34:11 UTC) #6
aiolos (Not reviewing)
On 2014/09/18 20:34:11, DaleCurtis wrote: > On 2014/09/18 20:30:59, aiolos wrote: > > On 2014/09/18 ...
6 years, 3 months ago (2014-09-18 21:45:51 UTC) #7
aiolos (Not reviewing)
https://codereview.chromium.org/562273008/diff/1/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/1/content/browser/renderer_host/media/audio_renderer_host.cc#newcode283 content/browser/renderer_host/media/audio_renderer_host.cc:283: // TODO(dalecurtis): See about using AudioStreamMonitor instead. On 2014/09/18 ...
6 years, 3 months ago (2014-09-18 21:46:48 UTC) #8
mmenke
https://codereview.chromium.org/562273008/diff/20001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/20001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode476 content/browser/renderer_host/media/audio_renderer_host.cc:476: bool had_active_audio = HasActiveAudio(); This is for the entire ...
6 years, 3 months ago (2014-09-18 21:55:51 UTC) #9
aiolos (Not reviewing)
https://codereview.chromium.org/562273008/diff/20001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/20001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode476 content/browser/renderer_host/media/audio_renderer_host.cc:476: bool had_active_audio = HasActiveAudio(); On 2014/09/18 21:55:51, mmenke wrote: ...
6 years, 3 months ago (2014-09-18 22:23:11 UTC) #10
DaleCurtis
https://codereview.chromium.org/562273008/diff/20001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/20001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode476 content/browser/renderer_host/media/audio_renderer_host.cc:476: bool had_active_audio = HasActiveAudio(); On 2014/09/18 22:23:11, aiolos wrote: ...
6 years, 3 months ago (2014-09-18 22:57:39 UTC) #11
aiolos (Not reviewing)
https://codereview.chromium.org/562273008/diff/20001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/20001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode476 content/browser/renderer_host/media/audio_renderer_host.cc:476: bool had_active_audio = HasActiveAudio(); On 2014/09/18 22:57:38, DaleCurtis wrote: ...
6 years, 3 months ago (2014-09-19 00:37:36 UTC) #12
DaleCurtis
media/ lgtm % style nits. https://codereview.chromium.org/562273008/diff/40001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/40001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode478 content/browser/renderer_host/media/audio_renderer_host.cc:478: if (is_playing) { no ...
6 years, 3 months ago (2014-09-19 00:42:39 UTC) #13
aiolos (Not reviewing)
https://codereview.chromium.org/562273008/diff/40001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/40001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode478 content/browser/renderer_host/media/audio_renderer_host.cc:478: if (is_playing) { On 2014/09/19 00:42:39, DaleCurtis wrote: > ...
6 years, 3 months ago (2014-09-19 00:52:46 UTC) #14
mmenke
LGTM https://codereview.chromium.org/562273008/diff/60001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/60001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode8 content/browser/renderer_host/media/audio_renderer_host.cc:8: #include "base/bind_helpers.h" While you're here, mind adding base/logging.h, ...
6 years, 3 months ago (2014-09-19 01:28:58 UTC) #15
miu
Drive-by comment: Consider eliminating any new per-RenderView code and instead making it per-RenderFrame to help ...
6 years, 3 months ago (2014-09-19 02:21:24 UTC) #16
mmenke
On 2014/09/19 02:21:24, miu wrote: > Drive-by comment: Consider eliminating any new per-RenderView code and ...
6 years, 3 months ago (2014-09-19 02:30:08 UTC) #17
aiolos (Not reviewing)
On 2014/09/19 02:30:08, mmenke wrote: > On 2014/09/19 02:21:24, miu wrote: > > Drive-by comment: ...
6 years, 3 months ago (2014-09-19 16:10:04 UTC) #18
aiolos (Not reviewing)
https://codereview.chromium.org/562273008/diff/80001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/80001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode451 content/browser/renderer_host/media/audio_renderer_host.cc:451: UpdateNumPlayingStreams(entry.get(), false); It looks like entry.get() is sometimes failing ...
6 years, 3 months ago (2014-09-19 17:33:56 UTC) #19
DaleCurtis
https://codereview.chromium.org/562273008/diff/80001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/80001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode451 content/browser/renderer_host/media/audio_renderer_host.cc:451: UpdateNumPlayingStreams(entry.get(), false); On 2014/09/19 17:33:56, aiolos wrote: > It ...
6 years, 3 months ago (2014-09-19 17:40:40 UTC) #20
aiolos (Not reviewing)
https://codereview.chromium.org/562273008/diff/80001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/80001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode451 content/browser/renderer_host/media/audio_renderer_host.cc:451: UpdateNumPlayingStreams(entry.get(), false); On 2014/09/19 17:40:40, DaleCurtis wrote: > On ...
6 years, 3 months ago (2014-09-19 18:59:19 UTC) #21
DaleCurtis
https://codereview.chromium.org/562273008/diff/80001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/562273008/diff/80001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1389 content/browser/loader/resource_dispatcher_host_impl.cc:1389: scheduler_->OnAudibilityChanged(child_id, route_id, is_playing); It's crashing here, not in AUdioRendererHost. ...
6 years, 3 months ago (2014-09-19 19:13:42 UTC) #22
mmenke
https://codereview.chromium.org/562273008/diff/80001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/80001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode482 content/browser/renderer_host/media/audio_renderer_host.cc:482: if (is_playing) { On 2014/09/19 18:59:18, aiolos wrote: > ...
6 years, 3 months ago (2014-09-19 20:32:41 UTC) #23
DaleCurtis
https://codereview.chromium.org/562273008/diff/80001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/80001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode482 content/browser/renderer_host/media/audio_renderer_host.cc:482: if (is_playing) { On 2014/09/19 20:32:40, mmenke wrote: > ...
6 years, 3 months ago (2014-09-19 20:39:41 UTC) #24
DaleCurtis
https://codereview.chromium.org/562273008/diff/100001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/100001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode451 content/browser/renderer_host/media/audio_renderer_host.cc:451: AudioEntry* const entry_ptr = entry.get(); Why de-inline this? https://codereview.chromium.org/562273008/diff/100001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode490 ...
6 years, 3 months ago (2014-09-19 20:44:27 UTC) #25
aiolos (Not reviewing)
Sorry about that. Fixed the error (there was a race between when the render_view was ...
6 years, 3 months ago (2014-09-19 23:53:00 UTC) #27
DaleCurtis
https://codereview.chromium.org/562273008/diff/160001/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/562273008/diff/160001/content/browser/renderer_host/media/audio_renderer_host.cc#newcode485 content/browser/renderer_host/media/audio_renderer_host.cc:485: should_alert_resource_scheduler = I don't think this does what you ...
6 years, 3 months ago (2014-09-22 18:45:41 UTC) #28
aiolos (Not reviewing)
I've been unable to reproduce the error that the try bot are seeing locally since ...
6 years, 3 months ago (2014-09-22 21:20:30 UTC) #29
DaleCurtis
The trybot errors from PS#10 look like a race condition or failure to initialize the ...
6 years, 3 months ago (2014-09-22 21:28:25 UTC) #30
aiolos (Not reviewing)
PTAL. The issue was two fold: The MockRenderProcessHost subclasses RenderProcessHost, not RenderProcessHostImpl, and the TestRenderViewHost ...
6 years, 2 months ago (2014-09-29 22:03:48 UTC) #31
DaleCurtis
jam@ is best suited to answer those questions. I suspect the mocks were intentionally not ...
6 years, 2 months ago (2014-09-29 22:34:56 UTC) #32
aiolos (Not reviewing)
On 2014/09/29 22:34:56, DaleCurtis wrote: > jam@ is best suited to answer those questions. I ...
6 years, 2 months ago (2014-09-29 22:59:18 UTC) #33
DaleCurtis
Looks like the patch needs a rebase.
6 years, 2 months ago (2014-09-29 23:47:51 UTC) #34
DaleCurtis
lgtm % addressing comments on ps#13 + 2 new ones. https://codereview.chromium.org/562273008/diff/240001/content/browser/renderer_host/media/audio_renderer_host.h File content/browser/renderer_host/media/audio_renderer_host.h (right): https://codereview.chromium.org/562273008/diff/240001/content/browser/renderer_host/media/audio_renderer_host.h#newcode94 ...
6 years, 2 months ago (2014-09-30 17:15:15 UTC) #35
DaleCurtis
Err, comments on PS#11, though PS#13 too :)
6 years, 2 months ago (2014-09-30 17:15:47 UTC) #36
aiolos (Not reviewing)
On 2014/09/30 17:15:15, DaleCurtis wrote: > lgtm % addressing comments on ps#13 + 2 new ...
6 years, 2 months ago (2014-09-30 17:41:31 UTC) #37
DaleCurtis
OIC, is ARH only NULL when setup_for_testing is true?
6 years, 2 months ago (2014-09-30 17:44:33 UTC) #38
aiolos (Not reviewing)
On 2014/09/30 17:44:33, DaleCurtis wrote: > OIC, is ARH only NULL when setup_for_testing is true? ...
6 years, 2 months ago (2014-09-30 17:53:47 UTC) #39
DaleCurtis
ARH can never be NULL post RPHI::Init(). The SiteInstance::GetProcess() method runs before the rest of ...
6 years, 2 months ago (2014-09-30 18:07:57 UTC) #40
aiolos (Not reviewing)
To be more clear, there is no RenderProcessHostImpl when setup_for_testing is true, and that isn't ...
6 years, 2 months ago (2014-09-30 18:15:13 UTC) #41
aiolos (Not reviewing)
On 2014/09/30 18:07:57, DaleCurtis wrote: > ARH can never be NULL post RPHI::Init(). The SiteInstance::GetProcess() ...
6 years, 2 months ago (2014-09-30 18:17:37 UTC) #42
DaleCurtis
On 2014/09/30 18:17:37, aiolos wrote: > On 2014/09/30 18:07:57, DaleCurtis wrote: > > ARH can ...
6 years, 2 months ago (2014-09-30 18:20:07 UTC) #43
aiolos (Not reviewing)
On 2014/09/30 18:17:37, aiolos wrote: > On 2014/09/30 18:07:57, DaleCurtis wrote: > > ARH can ...
6 years, 2 months ago (2014-09-30 18:20:35 UTC) #44
DaleCurtis
lgtm
6 years, 2 months ago (2014-09-30 23:23:48 UTC) #45
jam
lgtm https://codereview.chromium.org/562273008/diff/320001/content/browser/renderer_host/render_view_host_impl.h File content/browser/renderer_host/render_view_host_impl.h (right): https://codereview.chromium.org/562273008/diff/320001/content/browser/renderer_host/render_view_host_impl.h#newcode112 content/browser/renderer_host/render_view_host_impl.h:112: bool setup_for_testing); nit: can we just call this ...
6 years, 2 months ago (2014-10-01 00:12:36 UTC) #46
aiolos (Not reviewing)
On 2014/10/01 00:12:36, jam wrote: > lgtm > > https://codereview.chromium.org/562273008/diff/320001/content/browser/renderer_host/render_view_host_impl.h > File content/browser/renderer_host/render_view_host_impl.h (right): > ...
6 years, 2 months ago (2014-10-01 00:23:46 UTC) #47
aiolos (Not reviewing)
On 2014/10/01 00:23:46, aiolos wrote: > On 2014/10/01 00:12:36, jam wrote: > > lgtm > ...
6 years, 2 months ago (2014-10-01 00:27:03 UTC) #48
aiolos (Not reviewing)
On 2014/10/01 00:23:46, aiolos wrote: > On 2014/10/01 00:12:36, jam wrote: > > lgtm > ...
6 years, 2 months ago (2014-10-01 00:27:11 UTC) #49
jam
https://codereview.chromium.org/562273008/diff/340001/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): https://codereview.chromium.org/562273008/diff/340001/content/browser/renderer_host/render_view_host_impl.cc#newcode216 content/browser/renderer_host/render_view_host_impl.cc:216: } actually, now that I look at this some ...
6 years, 2 months ago (2014-10-01 20:31:38 UTC) #50
aiolos (Not reviewing)
On 2014/10/01 20:31:38, jam wrote: > https://codereview.chromium.org/562273008/diff/340001/content/browser/renderer_host/render_view_host_impl.cc > File content/browser/renderer_host/render_view_host_impl.cc (right): > > https://codereview.chromium.org/562273008/diff/340001/content/browser/renderer_host/render_view_host_impl.cc#newcode216 > ...
6 years, 2 months ago (2014-10-01 20:40:19 UTC) #51
jam
On 2014/10/01 20:40:19, aiolos wrote: > On 2014/10/01 20:31:38, jam wrote: > > > https://codereview.chromium.org/562273008/diff/340001/content/browser/renderer_host/render_view_host_impl.cc ...
6 years, 2 months ago (2014-10-02 01:09:34 UTC) #52
aiolos (Not reviewing)
On 2014/10/02 01:09:34, jam wrote: > On 2014/10/01 20:40:19, aiolos wrote: > > On 2014/10/01 ...
6 years, 2 months ago (2014-10-02 01:12:51 UTC) #53
aiolos (Not reviewing)
On 2014/10/02 01:12:51, aiolos wrote: > On 2014/10/02 01:09:34, jam wrote: > > On 2014/10/01 ...
6 years, 2 months ago (2014-10-02 01:37:42 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/562273008/360001
6 years, 2 months ago (2014-10-09 23:15:55 UTC) #56
commit-bot: I haz the power
Committed patchset #19 (id:360001)
6 years, 2 months ago (2014-10-10 00:49:05 UTC) #57
commit-bot: I haz the power
6 years, 2 months ago (2014-10-10 00:49:51 UTC) #58
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/6e7ce491a74481f8e3d7293ebb0ae58d62564526
Cr-Commit-Position: refs/heads/master@{#299029}

Powered by Google App Engine
This is Rietveld 408576698