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

Issue 10082032: Awake Mac host display when remote session starts. (Closed)

Created:
8 years, 8 months ago by dcaiafa
Modified:
8 years, 8 months ago
Reviewers:
Avi (use Gerrit), Wez
CC:
chromium-reviews, jamiewalch+watch_chromium.org, dcaiafa+watch_chromium.org, simonmorris+watch_chromium.org, hclam+watch_chromium.org, wez+watch_chromium.org, amit, sanjeevr, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, alexeypa+watch_chromium.org, sergeyu+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Wake Mac host display when remote session starts. Create a power management assertion when a remote session starts. The power assertion will wake the display if it's asleep and will keep it awake while the remote session is in progress. BUG=120429 TEST=manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=132475

Patch Set 1 #

Total comments: 12

Patch Set 2 : Now with extra feedback changes. #

Patch Set 3 : Removed power_assertion_created_. Checking power_assertion_id_ against kIOPMNullAssertionID. #

Total comments: 2

Patch Set 4 : Replaced IOPMAssertionCreateWithName (not in 10.5) with IOPMAssertionCreate #

Patch Set 5 : Fix unittest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -1 line) Patch
M remoting/host/capturer_mac.cc View 1 2 3 9 chunks +49 lines, -1 line 0 comments Download
M remoting/host/capturer_mac_unittest.cc View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
dcaiafa
8 years, 8 months ago (2012-04-13 23:58:15 UTC) #1
Wez
https://chromiumcodereview.appspot.com/10082032/diff/1/remoting/host/capturer_mac.cc File remoting/host/capturer_mac.cc (right): https://chromiumcodereview.appspot.com/10082032/diff/1/remoting/host/capturer_mac.cc#newcode29 remoting/host/capturer_mac.cc:29: const int64 kPMAssertionTimeoutMs = 5 * 1000; // 30 ...
8 years, 8 months ago (2012-04-14 00:08:22 UTC) #2
Wez
Oh, and the first two "awake"s in the CL description should really just be "wake". ...
8 years, 8 months ago (2012-04-14 00:09:24 UTC) #3
dcaiafa
ptal. https://chromiumcodereview.appspot.com/10082032/diff/1/remoting/host/capturer_mac.cc File remoting/host/capturer_mac.cc (right): https://chromiumcodereview.appspot.com/10082032/diff/1/remoting/host/capturer_mac.cc#newcode29 remoting/host/capturer_mac.cc:29: const int64 kPMAssertionTimeoutMs = 5 * 1000; // ...
8 years, 8 months ago (2012-04-14 00:21:40 UTC) #4
Wez
https://chromiumcodereview.appspot.com/10082032/diff/1/remoting/host/capturer_mac.cc File remoting/host/capturer_mac.cc (right): https://chromiumcodereview.appspot.com/10082032/diff/1/remoting/host/capturer_mac.cc#newcode237 remoting/host/capturer_mac.cc:237: bool pm_assertion_created_; OK. Is zero a valid power management ...
8 years, 8 months ago (2012-04-14 00:24:39 UTC) #5
dcaiafa
ptal https://chromiumcodereview.appspot.com/10082032/diff/1/remoting/host/capturer_mac.cc File remoting/host/capturer_mac.cc (right): https://chromiumcodereview.appspot.com/10082032/diff/1/remoting/host/capturer_mac.cc#newcode237 remoting/host/capturer_mac.cc:237: bool pm_assertion_created_; Turns out that there is a ...
8 years, 8 months ago (2012-04-14 00:37:43 UTC) #6
Wez
lgtm
8 years, 8 months ago (2012-04-14 00:41:50 UTC) #7
Avi (use Gerrit)
A thought: there is already an RAII class to do exactly this in PowerSaveBlocker in ...
8 years, 8 months ago (2012-04-14 00:42:33 UTC) #8
Jamie
https://chromiumcodereview.appspot.com/10082032/diff/5/remoting/host/capturer_mac.cc File remoting/host/capturer_mac.cc (right): https://chromiumcodereview.appspot.com/10082032/diff/5/remoting/host/capturer_mac.cc#newcode656 remoting/host/capturer_mac.cc:656: IOReturn result = IOPMAssertionCreateWithName( On 2012/04/14 00:42:33, Avi wrote: ...
8 years, 8 months ago (2012-04-14 01:26:35 UTC) #9
dcaiafa
Replaced call to IOPMCreateAssertionWithName which is only available in 10.6+ with IOPMCreateAssertion. Verified it builds ...
8 years, 8 months ago (2012-04-16 17:28:07 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dcaiafa@chromium.org/10082032/7001
8 years, 8 months ago (2012-04-16 17:50:57 UTC) #11
commit-bot: I haz the power
Try job failure for 10082032-7001 (retry) on mac_rel for step "remoting_unittests". It's a second try, ...
8 years, 8 months ago (2012-04-16 19:23:08 UTC) #12
dcaiafa
ptal. The usage of a timer by the capturer broke the unittest since it was ...
8 years, 8 months ago (2012-04-16 20:24:22 UTC) #13
Wez
lgtm
8 years, 8 months ago (2012-04-16 20:31:24 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dcaiafa@chromium.org/10082032/16001
8 years, 8 months ago (2012-04-16 20:43:27 UTC) #15
commit-bot: I haz the power
8 years, 8 months ago (2012-04-16 22:15:24 UTC) #16
Change committed as 132475

Powered by Google App Engine
This is Rietveld 408576698