| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/power_save_blocker_impl.h" | 5 #include "content/browser/power_save_blocker_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/bind.h" | 9 #include "base/bind.h" |
| 11 #include "base/location.h" | 10 #include "base/location.h" |
| 12 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "chromeos/dbus/power_policy_controller.h" | 14 #include "chromeos/dbus/power_policy_controller.h" |
| 15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Converts a PowerSaveBlocker::Reason to a | 21 // Converts a PowerSaveBlocker::Reason to a |
| 22 // chromeos::PowerPolicyController::WakeLockReason. | 22 // chromeos::PowerPolicyController::WakeLockReason. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 92 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 93 base::Bind(&Delegate::ApplyBlock, delegate_)); | 93 base::Bind(&Delegate::ApplyBlock, delegate_)); |
| 94 } | 94 } |
| 95 | 95 |
| 96 PowerSaveBlockerImpl::~PowerSaveBlockerImpl() { | 96 PowerSaveBlockerImpl::~PowerSaveBlockerImpl() { |
| 97 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 97 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 98 base::Bind(&Delegate::RemoveBlock, delegate_)); | 98 base::Bind(&Delegate::RemoveBlock, delegate_)); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace content | 101 } // namespace content |
| OLD | NEW |