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

Unified Diff: ash/wm/tablet_power_state_delegate_chromeos.cc

Issue 2474913004: Tablet-like power button behavior on Convertible/Tablet ChromeOS devices (Closed)
Patch Set: Created 4 years, 1 month 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
Index: ash/wm/tablet_power_state_delegate_chromeos.cc
diff --git a/ash/wm/tablet_power_state_delegate_chromeos.cc b/ash/wm/tablet_power_state_delegate_chromeos.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b9ff969d42a7567c7ee2488e88dc982e9f582115
--- /dev/null
+++ b/ash/wm/tablet_power_state_delegate_chromeos.cc
@@ -0,0 +1,29 @@
+// Copyright 2016 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.
+
+#include "ash/wm/tablet_power_state_delegate_chromeos.h"
+
+#include "chromeos/dbus/dbus_thread_manager.h"
+#include "chromeos/dbus/power_manager_client.h"
+
+namespace ash {
+
+TabletPowerStateDelegateChromeos::TabletPowerStateDelegateChromeos() {}
+
+TabletPowerStateDelegateChromeos::~TabletPowerStateDelegateChromeos() {}
+
+void TabletPowerStateDelegateChromeos::SetBacklightsForcedOff(bool forced_off) {
+ chromeos::DBusThreadManager::Get()
+ ->GetPowerManagerClient()
+ ->SetBacklightsForcedOff(forced_off);
+}
+
+void TabletPowerStateDelegateChromeos::GetBacklightsForcedOff(
+ const base::Callback<void(bool)>& callback) {
+ chromeos::DBusThreadManager::Get()
+ ->GetPowerManagerClient()
+ ->GetBacklightsForcedOff(callback);
+}
+
+} // namespace ash
« ash/wm/power_button_controller.cc ('K') | « ash/wm/tablet_power_state_delegate_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698