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

Unified Diff: ash/system/power/tablet_power_button_controller.cc

Issue 2815453007: cros: Stop forcing off display when lid events are received (Closed)
Patch Set: .. Created 3 years, 8 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
Index: ash/system/power/tablet_power_button_controller.cc
diff --git a/ash/system/power/tablet_power_button_controller.cc b/ash/system/power/tablet_power_button_controller.cc
index 0347bbdd26b23a67a2f8a2cbced29a5082ef1af7..28ba191eedf1beadb4dec9e0992023029eb5c793 100644
--- a/ash/system/power/tablet_power_button_controller.cc
+++ b/ash/system/power/tablet_power_button_controller.cc
@@ -162,6 +162,15 @@ void TabletPowerButtonController::SuspendDone(
last_resume_time_ = tick_clock_->NowTicks();
}
+void TabletPowerButtonController::LidEventReceived(
+ chromeos::PowerManagerClient::LidState state,
+ const base::TimeTicks& timestamp) {
+ if (state == chromeos::PowerManagerClient::LidState::OPEN ||
+ state == chromeos::PowerManagerClient::LidState::CLOSED) {
Daniel Erat 2017/04/13 04:31:16 you don't really need to test this; these are the
Qiang(Joe) Xu 2017/04/13 04:49:40 Done.
+ SetDisplayForcedOff(false);
+ }
+}
+
void TabletPowerButtonController::OnMaximizeModeStarted() {
shutdown_timer_.Stop();
if (controller_->CanCancelShutdownAnimation())

Powered by Google App Engine
This is Rietveld 408576698