| 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 <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 11 #include "base/win/scoped_handle.h" | 12 #include "base/win/scoped_handle.h" |
| 12 #include "base/win/windows_version.h" | 13 #include "base/win/windows_version.h" |
| 13 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 14 | 15 |
| 15 namespace content { | 16 namespace content { |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| 18 int g_blocker_count[2]; | 19 int g_blocker_count[2]; |
| 19 | 20 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 base::Bind(&Delegate::ApplyBlock, delegate_)); | 169 base::Bind(&Delegate::ApplyBlock, delegate_)); |
| 169 } | 170 } |
| 170 | 171 |
| 171 PowerSaveBlockerImpl::~PowerSaveBlockerImpl() { | 172 PowerSaveBlockerImpl::~PowerSaveBlockerImpl() { |
| 172 BrowserThread::PostTask( | 173 BrowserThread::PostTask( |
| 173 BrowserThread::UI, FROM_HERE, | 174 BrowserThread::UI, FROM_HERE, |
| 174 base::Bind(&Delegate::RemoveBlock, delegate_)); | 175 base::Bind(&Delegate::RemoveBlock, delegate_)); |
| 175 } | 176 } |
| 176 | 177 |
| 177 } // namespace content | 178 } // namespace content |
| OLD | NEW |