Index: content/browser/power_save_blocker_wayland.cc |
diff --git a/content/browser/power_save_blocker_chromeos.cc b/content/browser/power_save_blocker_wayland.cc |
similarity index 57% |
copy from content/browser/power_save_blocker_chromeos.cc |
copy to content/browser/power_save_blocker_wayland.cc |
index 9eda5c450275f4b7664e5dd34187672e71618ba6..693f187a16b05df70d3edab4d763bcb38428ae5b 100644 |
--- a/content/browser/power_save_blocker_chromeos.cc |
+++ b/content/browser/power_save_blocker_wayland.cc |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -11,8 +11,6 @@ |
#include "base/location.h" |
#include "base/logging.h" |
#include "base/memory/ref_counted.h" |
-#include "chromeos/dbus/dbus_thread_manager.h" |
-#include "chromeos/dbus/power_policy_controller.h" |
#include "content/public/browser/browser_thread.h" |
namespace content { |
@@ -26,34 +24,9 @@ class PowerSaveBlockerImpl::Delegate |
block_id_(0) {} |
void ApplyBlock() { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- if (!chromeos::DBusThreadManager::IsInitialized()) { |
- LOG(WARNING) << "DBusThreadManager not initialized"; |
- return; |
- } |
- |
- chromeos::PowerPolicyController* controller = |
- chromeos::DBusThreadManager::Get()->GetPowerPolicyController(); |
- switch (type_) { |
- case kPowerSaveBlockPreventAppSuspension: |
- block_id_ = controller->AddSystemWakeLock(reason_); |
- break; |
- case kPowerSaveBlockPreventDisplaySleep: |
- block_id_ = controller->AddScreenWakeLock(reason_); |
- break; |
- default: |
- NOTREACHED() << "Unhandled block type " << type_; |
- } |
} |
void RemoveBlock() { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- if (!chromeos::DBusThreadManager::IsInitialized()) { |
- LOG(WARNING) << "DBusThreadManager not initialized"; |
- return; |
- } |
- chromeos::DBusThreadManager::Get()->GetPowerPolicyController()-> |
- RemoveWakeLock(block_id_); |
} |
private: |