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

Issue 2867303003: Generalize the API of WakeLockContext mojo interface. (Closed)

Created:
3 years, 7 months ago by ke.he
Modified:
3 years, 7 months ago
Reviewers:
Tom Sepez, jam, blundell
CC:
chromium-reviews, creis+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, nasko+codewatch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, darin (slow to review)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Generalize the API of WakeLockContext mojo interface. Generalize the API of WakeLockContext mojo interface, so client can pass type, reason and description as they want to create the WakeLockService. BUG=689410 Review-Url: https://codereview.chromium.org/2867303003 Cr-Commit-Position: refs/heads/master@{#470801} Committed: https://chromium.googlesource.com/chromium/src/+/f435c1e84c2fb1cdfe7b68739cfd05ff8c49dee4

Patch Set 1 #

Total comments: 4

Patch Set 2 : remove typemap, call InitDisplaySleepBlocker with condition. #

Total comments: 2

Patch Set 3 : Use switch case instead of static_cast #

Total comments: 1

Patch Set 4 : Generalize the API of WakeLockContext mojo interface. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -31 lines) Patch
M content/browser/wake_lock/wake_lock_context_host.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 1 chunk +4 lines, -1 line 0 comments Download
M device/power_save_blocker/BUILD.gn View 1 chunk +2 lines, -2 lines 0 comments Download
M device/wake_lock/public/interfaces/wake_lock_context.mojom View 1 1 chunk +25 lines, -1 line 0 comments Download
M device/wake_lock/public/interfaces/wake_lock_context_provider.mojom View 1 chunk +1 line, -1 line 0 comments Download
M device/wake_lock/wake_lock_context_provider.h View 1 chunk +1 line, -1 line 0 comments Download
M device/wake_lock/wake_lock_context_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M device/wake_lock/wake_lock_service_context.h View 1 1 chunk +4 lines, -1 line 0 comments Download
M device/wake_lock/wake_lock_service_context.cc View 1 2 chunks +5 lines, -7 lines 0 comments Download
M device/wake_lock/wake_lock_service_impl.h View 1 3 chunks +5 lines, -4 lines 0 comments Download
M device/wake_lock/wake_lock_service_impl.cc View 1 2 3 2 chunks +45 lines, -11 lines 0 comments Download

Messages

Total messages: 40 (24 generated)
ke.he
Hi, Colin, I split out the //device stuff. PTAL. Thanks!
3 years, 7 months ago (2017-05-09 09:14:48 UTC) #8
blundell
Thanks! https://codereview.chromium.org/2867303003/diff/1/device/wake_lock/public/interfaces/wake_lock_context.mojom File device/wake_lock/public/interfaces/wake_lock_context.mojom (right): https://codereview.chromium.org/2867303003/diff/1/device/wake_lock/public/interfaces/wake_lock_context.mojom#newcode9 device/wake_lock/public/interfaces/wake_lock_context.mojom:9: // TODO(heke): Switch PowerSaveBlocker to use WakeLockType and ...
3 years, 7 months ago (2017-05-09 15:53:24 UTC) #9
ke.he
Colin, Thanks very much! PTAL. https://codereview.chromium.org/2867303003/diff/1/device/wake_lock/public/interfaces/wake_lock_context.mojom File device/wake_lock/public/interfaces/wake_lock_context.mojom (right): https://codereview.chromium.org/2867303003/diff/1/device/wake_lock/public/interfaces/wake_lock_context.mojom#newcode9 device/wake_lock/public/interfaces/wake_lock_context.mojom:9: // TODO(heke): Switch PowerSaveBlocker ...
3 years, 7 months ago (2017-05-10 07:00:20 UTC) #14
ke.he
By the way, the work of "adding interface GetUnassociatedWakeLockContext()" and "converting the first non-webcontents-context client" ...
3 years, 7 months ago (2017-05-10 09:45:17 UTC) #15
blundell
lgtm, thanks! https://codereview.chromium.org/2867303003/diff/20001/device/wake_lock/wake_lock_service_impl.cc File device/wake_lock/wake_lock_service_impl.cc (right): https://codereview.chromium.org/2867303003/diff/20001/device/wake_lock/wake_lock_service_impl.cc#newcode99 device/wake_lock/wake_lock_service_impl.cc:99: static_cast<PowerSaveBlocker::PowerSaveBlockerType>(type_); hmm, I think it would be ...
3 years, 7 months ago (2017-05-10 10:05:11 UTC) #16
ke.he
static_cast was removed. thanks:) https://codereview.chromium.org/2867303003/diff/20001/device/wake_lock/wake_lock_service_impl.cc File device/wake_lock/wake_lock_service_impl.cc (right): https://codereview.chromium.org/2867303003/diff/20001/device/wake_lock/wake_lock_service_impl.cc#newcode99 device/wake_lock/wake_lock_service_impl.cc:99: static_cast<PowerSaveBlocker::PowerSaveBlockerType>(type_); On 2017/05/10 10:05:11, blundell ...
3 years, 7 months ago (2017-05-10 13:12:03 UTC) #19
ke.he
Colin, PTAL again as I removed static_cast, thanks.
3 years, 7 months ago (2017-05-10 14:21:13 UTC) #22
ke.he
Jam@, PTAL on the //content. Tom, PTAL on the mojom. thanks all!
3 years, 7 months ago (2017-05-10 14:25:33 UTC) #24
blundell
still lgtm, thanks! https://codereview.chromium.org/2867303003/diff/40001/device/wake_lock/wake_lock_service_impl.cc File device/wake_lock/wake_lock_service_impl.cc (right): https://codereview.chromium.org/2867303003/diff/40001/device/wake_lock/wake_lock_service_impl.cc#newcode128 device/wake_lock/wake_lock_service_impl.cc:128: GetType(type_), GetReason(reason_), *description_, main_task_runner_, really tiny ...
3 years, 7 months ago (2017-05-10 14:43:47 UTC) #25
jam
lgtm
3 years, 7 months ago (2017-05-10 16:13:56 UTC) #26
Tom Sepez
lgtm
3 years, 7 months ago (2017-05-10 16:36:10 UTC) #27
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/2867303003/60001
3 years, 7 months ago (2017-05-10 23:01:46 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/212182)
3 years, 7 months ago (2017-05-11 00:07:43 UTC) #31
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/2867303003/60001
3 years, 7 months ago (2017-05-11 01:54:35 UTC) #33
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/2867303003/60001
3 years, 7 months ago (2017-05-11 04:00:03 UTC) #37
commit-bot: I haz the power
3 years, 7 months ago (2017-05-11 04:09:34 UTC) #40
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/f435c1e84c2fb1cdfe7b68739cfd...

Powered by Google App Engine
This is Rietveld 408576698