summaryrefslogtreecommitdiffstats
path: root/chromeos/power
Commit message (Collapse)AuthorAgeFilesLines
* Move TrayPower related code frome ash/system/power to ↵jennyz@chromium.org2013-05-163-0/+282
| | | | | | | | | | | | | | | | | | | ash/system/chromeos/power. This helps: 1. Remove the duplicated PowerSupplyStatus from ash/system/power. 2. Remove PowerStatusObserver from ash/system/power. 3. Remove power supply status related state, apis and observer from ash_system_tray_delegate.cc. Not done yet: There are still other PowerManagerClient calls in ash_system_tray_delegate.cc, which are used by other code. We may be able to move them into the new PowerManagerHandler, which will further downsize ash_system_tray_delegate. This could be done in another cl. BUG=190299 TBR=sky Review URL: https://chromiumcodereview.appspot.com/14691011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200463 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Remove PowerStateOverride.derat@chromium.org2013-03-213-287/+0
| | | | | | | | | | | | | | | 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: Don't override suspend-on-lid-closed.derat@chromium.org2013-02-153-8/+4
| | | | | | | | | | | | | | | | | | | | This prevents PowerStateOverride::BLOCK_SYSTEM_SUSPEND, which is used while the system is uploading or downloading files or playing web audio, from setting the power manager's disable_lid_suspend override. This override used to be unimplemented in powerd, but it works now, and we don't want the system to stay awake after the lid is closed. It also renames PowerManagerClient::DISABLE_IDLE_LID_SUSPEND to DISABLE_LID_SUSPEND; it doesn't have anything to do with idleness. BUG=176078 Review URL: https://chromiumcodereview.appspot.com/12260029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182707 0039d316-1c4b-4281-b951-d872f2087c98
* Make power state override refcounted.rkc@chromium.org2012-11-203-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | In the case of power state override being created and immidiatelly destructed, we'll have a scenario in which the correct power state request won't get cancelled. e.g., . User creates PowerStateOverride instance -> We call RequestPowerStateOverride - we wait for the callback from ChromeOS to get our request ID . User deletes PowerStateOverride instance -> We call CancelPowerStateOverride with a 0 request ID . We destruct, invalidating our weak pointers . Callback from RequestPowerStateOverride never lands since the weakptr is invalidated - Power state override remains in effect for the next 10 minutes. This has now changed to, . User creates PowerStateOverride instance -> We call RequestPowerStateOverride, this increments our reference count to 2 - we wait for the callback from ChromeOS to get our request ID . User releases his refernce to PowerStateOverride instance -> We decrement our reference count to 1 . RequestPowerStateOverride returns, giving us our RequestID, and decrements our refernce count to 0 . Destructor gets called, which does a CancelPowerStateOverride with the correct request ID - The PowerStateOverride is cancelled R=derat@chromium.org BUG=151732 Review URL: https://codereview.chromium.org/11358222 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168644 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r168414 "Make power state override refcounted."maruel@chromium.org2012-11-173-35/+17
| | | | | | | | | | | | | Revert r168420 "chromeos/power: Refcounted types should not have public destructors." Broke linux_chromeos_clang. TBR=tfarina@chromium.org,derat@chromium.org,rkc@chromium.org BUG=123295 Review URL: https://codereview.chromium.org/11415041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168421 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos/power: Refcounted types should not have public destructors.tfarina@chromium.org2012-11-171-5/+6
| | | | | | | | | | | This was broken this CL: https://chromiumcodereview.appspot.com/11358222/ BUG=123295 TBR=derat@chromium.org,rkc@chromium.org Review URL: https://codereview.chromium.org/11413056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168420 0039d316-1c4b-4281-b951-d872f2087c98
* Make power state override refcounted.rkc@chromium.org2012-11-173-16/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case of power state override being created and immidiatelly destructed, we'll have a scenario in which the correct power state request won't get cancelled. e.g., . User creates PowerStateOverride instance -> We call RequestPowerStateOverride - we wait for the callback from ChromeOS to get our request ID . User deletes PowerStateOverride instance -> We call CancelPowerStateOverride with a 0 request ID . We destruct, invalidating our weak pointers . Callback from RequestPowerStateOverride never lands since the weakptr is invalidated - Power state override remains in effect for the next 10 minutes. This has now changed to, . User creates PowerStateOverride instance -> We call RequestPowerStateOverride, this increments our reference count to 2 - we wait for the callback from ChromeOS to get our request ID . User releases his refernce to PowerStateOverride instance -> We decrement our reference count to 1 . RequestPowerStateOverride returns, giving us our RequestID, and decrements our refernce count to 0 . Destructor gets called, which does a CancelPowerStateOverride with the correct request ID - The PowerStateOverride is cancelled R=derat@chromium.org BUG=151732 Review URL: https://chromiumcodereview.appspot.com/11358222 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168414 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Fix PowerStateOverride/D-Bus lifetime issues.derat@chromium.org2012-10-083-18/+74
| | | | | | | | | | | | | This makes PowerStateOverride observe DBusThreadManager's lifetime so it can unregister its request if the manager is shutting down. BUG=154203,152429 Review URL: https://chromiumcodereview.appspot.com/11077009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160698 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Fix power override masks.derat@chromium.org2012-09-251-1/+2
| | | | | | | | | | | | | | | | | | PowerManagerClient::RequestPowerStateOverrides() takes a bitmap of OR-ed together PowerStateOverrideType values, but the values from that enum were 1, 2, 3, and 4 instead of using distinct bits. I'm also switching the 'duration' parameter to be a base::TimeDelta so people don't need to read the power manager source code to figure out what to pass. BUG=114128 Review URL: https://chromiumcodereview.appspot.com/10991006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158494 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Move PowerStateOverride to chromeos/power/.derat@chromium.org2012-09-233-0/+215
PowerStateOverride isn't dependent on anything within chrome/, and I want to use it from content/. BUG=114128 TEST=none TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10963044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158212 0039d316-1c4b-4281-b951-d872f2087c98