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

Issue 2846813002: Convert MediaWebContentsObsever to be the client of WakeLock mojo interface. (Closed)

Created:
3 years, 7 months ago by ke.he
Modified:
3 years, 7 months ago
Reviewers:
jam, DaleCurtis, blundell
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, nasko+codewatch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Convert MediaWebContentsObsever to be the client of WakeLock mojo interface. Convert MediaWebContentsObsever to be the client of WakeLock mojo interface instead of direct client of PowerSaveBlocker. TEST = Play audio or video and check the OS level wake locks. On macOS: pmset -g assertions On Windows: powercfg /requests. BUG=689413 TBR=<jam@chromium.org>; Review-Url: https://codereview.chromium.org/2846813002 Cr-Commit-Position: refs/heads/master@{#470889} Committed: https://chromium.googlesource.com/chromium/src/+/d54f936badc7666b7b0fb09c545942836e4e9943

Patch Set 1 #

Patch Set 2 : Convert MediaWebContentsObsever to be the client of WakeLock mojo interface. #

Total comments: 23

Patch Set 3 : Generalizing the API of WakeLockContext::GetWakeLock() #

Patch Set 4 : Addressed DaleCurtis's comments. #

Patch Set 5 : no change, test the Wakelock Core refactor. #

Patch Set 6 : rebase dependency patch #

Patch Set 7 : rebase dependency patch #

Patch Set 8 : split out //device part. #

Patch Set 9 : Use mojom type when calls GetWakeLock(). #

Patch Set 10 : rebase dependency #

Patch Set 11 : remove dependency, code rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -109 lines) Patch
M content/browser/media/media_web_contents_observer.h View 1 2 3 4 chunks +20 lines, -20 lines 0 comments Download
M content/browser/media/media_web_contents_observer.cc View 1 2 3 4 5 6 7 8 10 chunks +76 lines, -45 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 3 chunks +44 lines, -44 lines 0 comments Download

Messages

Total messages: 74 (50 generated)
ke.he
Colin, PTAL, Thanks:)
3 years, 7 months ago (2017-04-28 11:06:59 UTC) #10
blundell
This looks good! +xhwang@: Do you have any suggestions on manual tests of the functionality ...
3 years, 7 months ago (2017-05-02 11:30:44 UTC) #12
xhwang
xhwang -> dalecurtis, who's more familiar with this class.
3 years, 7 months ago (2017-05-02 16:29:08 UTC) #14
DaleCurtis
https://codereview.chromium.org/2846813002/diff/20001/content/browser/media/media_web_contents_observer.cc File content/browser/media/media_web_contents_observer.cc (right): https://codereview.chromium.org/2846813002/diff/20001/content/browser/media/media_web_contents_observer.cc#newcode55 content/browser/media/media_web_contents_observer.cc:55: if (audio_stream_monitor->WasRecentlyAudible()) { {} not necessary for single-line if. ...
3 years, 7 months ago (2017-05-02 17:08:42 UTC) #15
DaleCurtis
The unittest modified in this CL should cover all the necessary test cases. We unfortunately ...
3 years, 7 months ago (2017-05-02 17:09:31 UTC) #16
blundell
On 2017/05/02 17:09:31, DaleCurtis wrote: > The unittest modified in this CL should cover all ...
3 years, 7 months ago (2017-05-03 09:23:50 UTC) #17
DaleCurtis
Oh for a manual test you can play audio or video and check the OS ...
3 years, 7 months ago (2017-05-03 17:29:20 UTC) #18
ke.he
Hi, DaleCurtis@, Thanks very much. I updated this CL based on your comments. Hi, Colin, ...
3 years, 7 months ago (2017-05-04 11:58:24 UTC) #26
blundell
The changes in //device look great, thanks! I would actually split them into a CL ...
3 years, 7 months ago (2017-05-04 15:46:21 UTC) #27
DaleCurtis
media/ stuff lgtm, defer to blundell@ for the rest (or split out).
3 years, 7 months ago (2017-05-04 16:53:39 UTC) #28
ke.he
Thanks! I use this CL to verify issue 2843353003. After 2843353003 get landed, I'll split ...
3 years, 7 months ago (2017-05-05 10:03:25 UTC) #35
blundell
On 2017/05/05 10:03:25, ke.he wrote: > Thanks! > I use this CL to verify issue ...
3 years, 7 months ago (2017-05-05 12:50:30 UTC) #36
ke.he
Colin, split done. PTAL. Thanks:)
3 years, 7 months ago (2017-05-09 09:19:10 UTC) #48
blundell
lgtm, thanks!
3 years, 7 months ago (2017-05-09 15:59:13 UTC) #49
ke.he
MediaWebContentsObsever pass mojom type when RequestWakeLock(). PTAL.
3 years, 7 months ago (2017-05-10 07:10:55 UTC) #54
ke.he
On 2017/05/10 07:10:55, ke.he wrote: > MediaWebContentsObsever pass mojom type when RequestWakeLock(). > PTAL. pass ...
3 years, 7 months ago (2017-05-10 07:12:01 UTC) #55
blundell
still lgtm, thanks!
3 years, 7 months ago (2017-05-10 14:45:57 UTC) #57
ke.he
Hi, Jam@, PTAL on the //contents, thanks!
3 years, 7 months ago (2017-05-11 02:02:05 UTC) #59
blundell
Hi Ke He, It's fine to TBR jam@ on the changes to the WebContentsImpl unittest ...
3 years, 7 months ago (2017-05-11 06:51:26 UTC) #64
ke.he
Got it, thanks:)
3 years, 7 months ago (2017-05-11 08:08:20 UTC) #66
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/2846813002/200001
3 years, 7 months ago (2017-05-11 09:19:55 UTC) #69
commit-bot: I haz the power
Committed patchset #11 (id:200001) as https://chromium.googlesource.com/chromium/src/+/d54f936badc7666b7b0fb09c545942836e4e9943
3 years, 7 months ago (2017-05-11 09:25:30 UTC) #72
blundell
TBR=jam@ for mechanical changes to web_contents_impl_unittest.cc (Ke He, that's the kind of message I was ...
3 years, 7 months ago (2017-05-11 11:52:04 UTC) #73
blundell
3 years, 7 months ago (2017-05-12 07:51:16 UTC) #74
Message was sent while issue was closed.
FYI, I tested this manually on my Macbook using today's canary (3097, includes
this change) using Dale's instructions. It works as expected, i.e., the same way
as stable does on the Macbook.

\o/

Powered by Google App Engine
This is Rietveld 408576698