summaryrefslogtreecommitdiffstats
path: root/content/browser/power_save_blocker_chromeos.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove NetworkLibrary references from unit_tests and browser_testsstevenjb@chromium.org2013-08-171-6/+3
| | | | | | | | | | | | | Also removes some files that are no longer referenced and some includes from files that do not actually use NetworkLibrary. BUG=273102 For activity_database_unittest.cc, in_process_browser_test.h: TBR=pneubeck@chromium.org Review URL: https://codereview.chromium.org/23183004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218145 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Add "allow screen wake locks" pref.derat@chromium.org2013-04-301-3/+3
| | | | | | | | | | | | 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: Remove PowerStateOverride.derat@chromium.org2013-03-211-18/+27
| | | | | | | | | | | | | | | 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: Stop trying to override power state when not runinng on real CrOS ↵hashimoto@chromium.org2013-01-291-0/+6
| | | | | | | | | | | | devices. Tests with PowerSaveBlocker result in CHECK failure without this fix. BUG=171949 Review URL: https://codereview.chromium.org/12036100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179331 0039d316-1c4b-4281-b951-d872f2087c98
* Make content::PowerSaveBlocker publichashimoto@chromium.org2013-01-151-6/+6
| | | | | | | | | BUG=152207 Review URL: https://chromiumcodereview.appspot.com/11784016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176806 0039d316-1c4b-4281-b951-d872f2087c98
* Make power state override refcounted.rkc@chromium.org2012-11-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-3/+3
| | | | | | | | | | | | | 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
* Make power state override refcounted.rkc@chromium.org2012-11-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Implement PowerSaveBlocker.derat@chromium.org2012-09-251-0/+69
This adds a Chrome OS implementation of PowerSaveBlocker to prevent e.g. the system from suspending during a download or the screen from dimming while web video is being played. BUG=114128 Review URL: https://chromiumcodereview.appspot.com/10988011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158625 0039d316-1c4b-4281-b951-d872f2087c98