Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: content/browser/power_save_blocker_wayland.cc

Issue 17265006: wayland patch for inspection Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/linux/system.gyp ('k') | content/browser/renderer_host/image_transport_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « build/linux/system.gyp ('k') | content/browser/renderer_host/image_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698