summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/power_policy_controller.h
Commit message (Collapse)AuthorAgeFilesLines
* chromeos: Add pref for automated brightness increases.derat2015-01-091-0/+1
| | | | | | | | | | | | | | Add a pref that controls whether the Chrome OS power manager will ensure that the screen brightness is nonzero when it observes user activity. Also bump the system_api dependency to 7678688b. BUG=chromium:256914 Review URL: https://codereview.chromium.org/807093003 Cr-Commit-Position: refs/heads/master@{#310786}
* Remove PowerPolicyController from DBusThreadManagerhashimoto2014-11-171-10/+17
| | | | | | | | | | Let PowerPolicyController manage its global instance. BUG=345586 Review URL: https://codereview.chromium.org/723063004 Cr-Commit-Position: refs/heads/master@{#304384}
* replace OVERRIDE and FINAL with override and final in chromeos/mostynb2014-10-061-1/+1
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/628883002 Cr-Commit-Position: refs/heads/master@{#298229}
* chromeos: Rename kEnableScreenLock to kEnableAutoScreenLock.derat@chromium.org2014-01-231-5/+5
| | | | | | | | | | | Rename a confusingly-named pref. BUG=none TBR=rsimha@chromium.org Review URL: https://codereview.chromium.org/143823005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246636 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://codereview.chromium.org/129193002/noamsml@chromium.org2014-01-081-15/+2
| | | | | | | | | | | | | Reason for revert: Did not fix chromeos failures TBR=bartfab@chromium.org,benwells@chromium.org,derat@chromium.org NOTREECHECKS=true NOTRY=true BUG=329930 Review URL: https://codereview.chromium.org/129303003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243671 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://codereview.chromium.org/116983008/noamsml@chromium.org2014-01-081-2/+15
| | | | | | | | | | | | | Reason for revert: ChromeOS bot failures on x86/amd64 TBR=bartfab@chromium.org,benwells@chromium.org,derat@chromium.org NOTREECHECKS=true NOTRY=true BUG=329930 Review URL: https://codereview.chromium.org/129193002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243634 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Don't send empty power management policies.derat@chromium.org2014-01-081-15/+2
| | | | | | | | | | | | | | | | | | | Update PowerPolicyController to not send an empty policy to powerd when Chrome starts or exits. Empty policies were originally sent to ensure the system wouldn't be stuck with an old policy, but they also mean that powerd could briefly revert to its default settings with undesireable results when the system first boots or the user logs out (e.g. an enterprise policy has disabled the lid-closed action, but powerd reverts to its default settings and shuts down automatically when the user logs out). BUG=329930 TBR=benwells@chromium.org Review URL: https://codereview.chromium.org/116983008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243566 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Brightness policies for PowerPolicyController.derat@chromium.org2013-11-181-0/+2
| | | | | | | | | | | | Add support to PowerPolicyController for controlling the screen brightness. This isn't controlled by any prefs or enterprise policies yet. BUG=310429 Review URL: https://codereview.chromium.org/69813007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235662 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeOS: Remove MockDBusThreadManager.pneubeck@chromium.org2013-11-101-1/+3
| | | | | | | | | | | | | | | | | | - Extends FakeDBusThreadManager about DBusClient setters. - Removes default initialization of DBusClients from FakeDBusThreadManager. - Replaces all occurrences of MockDBusThreadManager in tests by FakeDBusThreadManager. - Every test now creates exactly the DBusClients that are required. - Removes all references to Fake/Stub implementations from the DBusThreadManagerImpl used for production. Depends on: https://codereview.chromium.org/50243005/ BUG=275286 TBR=miket@chromium.org,mkwst@chromium.org,rtenneti@chromium.org Review URL: https://codereview.chromium.org/49773003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234172 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Send wait-for-user-activity pref to powerd.derat@chromium.org2013-10-281-0/+1
| | | | | | | | | | | | Make the value of the "wait for initial user activity" pref get included in PowerManagementPolicy protocol buffers sent to the power manager. BUG=310176 Review URL: https://codereview.chromium.org/46523003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231367 0039d316-1c4b-4281-b951-d872f2087c98
* Add policies to control power management on the Chrome OS login screenbartfab@chromium.org2013-07-171-0/+5
| | | | | | | | | | | | | | | | This CL adds a device policy that controls power management on the login screen. Before this CL, powerd controlled power policy on the login screen, always using built-in defaults. After this CL, Chrome contols power policy by explicitly sending it to powerd whenever the login screen is shown. The built-in defaults match those that powerd used to have but they can now be overridden through device policy. BUG=241794 TEST=Full coverage with new unit and broweser tests Review URL: https://chromiumcodereview.appspot.com/18153007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212024 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Send separate idle actions for AC and battery.derat@chromium.org2013-06-281-1/+2
| | | | | | | | | | | | | This updates Chrome to set both the |ac_idle_action| and |battery_idle_action| fields in PowerManagementPolicy protocol buffers that it sends to powerd. They're currently both set to the same value as there's only one Chrome pref. BUG=254404 Review URL: https://chromiumcodereview.appspot.com/17939002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209033 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Replace scale-delays-for-presentation-mode pref.derat@chromium.org2013-06-121-2/+2
| | | | | | | | | | | | | | | | This replaces the kPowerPresentationIdleDelayFactor pref with kPowerPresentationScreenDimDelayFactor. The former scaled the idle delay and then adjusted the other delays; the latter scales the screen-dim delay before adjusting other delays. It also updates the cros_system_api dependency to d2d441c1. BUG=chromium:248276 Review URL: https://chromiumcodereview.appspot.com/16677007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205905 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Add delay between screen off and lock.derat@chromium.org2013-06-031-0/+6
| | | | | | | | | | | | | | | | | This adds a ten-second delay between the time at which the screen is turned off due to user inactivity and the time at which it's locked. It also fixes an issue where screen wake locks (as used by video playback or by the chrome.power extension API) wouldn't clear lock delays. BUG=239486,246008 R=bartfab@chromium.org Review URL: https://codereview.chromium.org/15734010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203774 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Add "allow screen wake locks" pref.derat@chromium.org2013-04-301-12/+18
| | | | | | | | | | | | This adds a pref that enterprises can set to prevent screen-related power management (including screen-locking) from being overridden via the chrome.power extension API. BUG=226073,236827 Review URL: https://chromiumcodereview.appspot.com/14556004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197410 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Add pref for user-activity screen dim factor.derat@chromium.org2013-04-261-0/+1
| | | | | | | | | | | | | | | This adds a preference to control the scaling of the power manager's screen-dimming delay when user activity is observed while the screen is dimmed or soon after the screen has been turned off. The default scaling is left at 1.0 for now so that this won't have an adverse effect on public accounts (it can be increased once a policy has been added). BUG=212394 Review URL: https://chromiumcodereview.appspot.com/14373023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196658 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Move default power management policy into Chrome.derat@chromium.org2013-04-201-25/+33
| | | | | | | | | | | | | | | | | | This updates PowerPolicyController to always send the power management policy contained in Chrome's preferences to the power manager, rather than only sending prefs that have been changed from their defaults. Note that this currently only takes effect once the user has logged in. It also makes the screen get locked at the same time as when it's turned off when the "Require password to wake from sleep" setting is enabled. BUG=225730,225969 Review URL: https://codereview.chromium.org/14134004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195376 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Remove PowerStateOverride.derat@chromium.org2013-03-211-0/+28
| | | | | | | | | | | | | | | This removes the PowerStateOverride class, which made D-Bus requests to powerd to override various aspects of power management. It updates the Chrome OS implementation of PowerSaveBlocker to instead register requests with PowerPolicyController, which integrates said requests with the pref-derived power management policy. BUG=176405 Review URL: https://codereview.chromium.org/12775019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189699 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Add idle warning prefs.derat@chromium.org2013-03-201-0/+2
| | | | | | | | | | | | | | | | | This adds new "idle warning" prefs that are pushed to the power manager to tell it how long to wait before sending IdleActionImminent signals. If the inactivity timer is reset before the idle action is performed, an additional IdleActionDeferred signal is sent. This can be used to determine when to show and dismiss a "You will be logged out soon" dialog. BUG=195560 Review URL: https://chromiumcodereview.appspot.com/12475015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189397 0039d316-1c4b-4281-b951-d872f2087c98
* Remove PrefServiceBase, since everyone can now depend directly on PrefService.joi@chromium.org2013-02-161-14/+14
| | | | | | | | | | TBR=ben@chromium.org BUG=155525 Review URL: https://chromiumcodereview.appspot.com/12252008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182918 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r181070, "chromeos: Add power management policy prefs."derat@chromium.org2013-02-071-0/+80
| | | | | | | | | | | | | This reverts a revert, r181072. The original change broke the clang builder due to a missing OVERRIDE. BUG=173849 TBR=bartfab@chromium.org Review URL: https://chromiumcodereview.appspot.com/12212051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181168 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r181070, "chromeos: Add power management policy prefs."derat@chromium.org2013-02-061-79/+0
| | | | | | | | | BUG=173849 TBR=vitalybuka Review URL: https://codereview.chromium.org/12210047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181072 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Add power management policy prefs.derat@chromium.org2013-02-061-0/+79
This adds various prefs related to power management. A new PowerPolicyController class is responsible for sending them to powerd. BUG=173849,chromium-os:38281 Review URL: https://codereview.chromium.org/12186010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181070 0039d316-1c4b-4281-b951-d872f2087c98