OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/browser/power_save_blocker.h" |
6 | 6 |
7 #include <IOKit/pwr_mgt/IOPMLib.h> | 7 #include <IOKit/pwr_mgt/IOPMLib.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 if (!g_power_thread) { | 65 if (!g_power_thread) { |
66 g_power_assertion = kIOPMNullAssertionID; | 66 g_power_assertion = kIOPMNullAssertionID; |
67 g_power_thread = new base::Thread("PowerSaveBlocker"); | 67 g_power_thread = new base::Thread("PowerSaveBlocker"); |
68 g_power_thread->Start(); | 68 g_power_thread->Start(); |
69 } | 69 } |
70 | 70 |
71 g_power_thread->message_loop()-> | 71 g_power_thread->message_loop()-> |
72 PostTask(FROM_HERE, base::Bind(CreateSleepAssertion, type)); | 72 PostTask(FROM_HERE, base::Bind(CreateSleepAssertion, type)); |
73 } | 73 } |
| 74 |
OLD | NEW |