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

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

Issue 2855033004: cros: Update touchscreen status with backlights forced off state during start (Closed)
Patch Set: nits 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 a2b252809570dbedee17d42ef95d5f520d6b6d55..7d2fcc9c4b4e449120462abd010cf47885aab433 100644
--- a/ash/system/power/tablet_power_button_controller.cc
+++ b/ash/system/power/tablet_power_button_controller.cc
@@ -220,11 +220,7 @@ void TabletPowerButtonController::SetDisplayForcedOff(bool forced_off) {
->GetPowerManagerClient()
->SetBacklightsForcedOff(forced_off);
backlights_forced_off_ = forced_off;
-
- ShellDelegate* delegate = Shell::Get()->shell_delegate();
- delegate->SetTouchscreenEnabledInPrefs(!forced_off,
- true /* use_local_state */);
- delegate->UpdateTouchscreenStatusFromPrefs();
+ UpdateTouchscreenStatus();
// Send an a11y alert.
Shell::Get()->accessibility_delegate()->TriggerAccessibilityAlert(
@@ -242,6 +238,14 @@ void TabletPowerButtonController::GetInitialBacklightsForcedOff() {
void TabletPowerButtonController::OnGotInitialBacklightsForcedOff(
bool is_forced_off) {
backlights_forced_off_ = is_forced_off;
+ UpdateTouchscreenStatus();
+}
+
+void TabletPowerButtonController::UpdateTouchscreenStatus() {
+ ShellDelegate* delegate = Shell::Get()->shell_delegate();
+ delegate->SetTouchscreenEnabledInPrefs(!backlights_forced_off_,
+ true /* use_local_state */);
+ delegate->UpdateTouchscreenStatusFromPrefs();
}
void TabletPowerButtonController::StartShutdownTimer() {
« no previous file with comments | « ash/system/power/tablet_power_button_controller.h ('k') | ash/system/power/tablet_power_button_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698