diff options
author | derat <derat@chromium.org> | 2015-02-23 10:33:03 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-23 18:33:41 +0000 |
commit | f3c302a352d284298d790823f276c3efe943a9b6 (patch) | |
tree | 4a34871434e66d39b48479948ecbdb1a5caf2a13 /content/browser/power_save_blocker_android.cc | |
parent | a58ec6a8c37ed1146206c2e4143b58249bdf5255 (diff) | |
download | chromium_src-f3c302a352d284298d790823f276c3efe943a9b6.zip chromium_src-f3c302a352d284298d790823f276c3efe943a9b6.tar.gz chromium_src-f3c302a352d284298d790823f276c3efe943a9b6.tar.bz2 |
Use PowerSaveBlocker for audio and video on Chrome OS.
PowerSaveBlocker objects are constructed in response to web
audio and video to keep the system from suspending or
turning its display off. Historically, this was not used on
Chrome OS, as Chrome OS has alternate mechanisms for
detecting audio and video activity and using
PowerSaveBlocker would interfere with enterprise
power-management-policy prefs to ignore audio and video
activity.
However, low-framerate video, such as that used by WebRTC
for Hangouts screen-sharing, can fail to trigger Chrome OS's
video detection code, resulting in the screen being turned
off while in use. This change renames PowerSaveBlocker's
human-readable "reason" field to "description" and adds a
new Reason enum that Chrome OS uses to identify and ignore
audio- or video-triggered PowerSaveBlockers if needed.
BUG=354723,176405
TEST=watch /var/log/power_manager/powerd.LATEST on chrome os
while on the receiving end of a screen-sharing hangout
and observe that a policy is sent forcing the screen on
Review URL: https://codereview.chromium.org/946643002
Cr-Commit-Position: refs/heads/master@{#317612}
Diffstat (limited to 'content/browser/power_save_blocker_android.cc')
-rw-r--r-- | content/browser/power_save_blocker_android.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/content/browser/power_save_blocker_android.cc b/content/browser/power_save_blocker_android.cc index 2f79ef9..19a4963 100644 --- a/content/browser/power_save_blocker_android.cc +++ b/content/browser/power_save_blocker_android.cc @@ -57,7 +57,8 @@ void PowerSaveBlockerImpl::Delegate::RemoveBlock() { } PowerSaveBlockerImpl::PowerSaveBlockerImpl(PowerSaveBlockerType type, - const std::string& reason) { + Reason reason, + const std::string& description) { // Don't support kPowerSaveBlockPreventAppSuspension } |