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

Side by Side Diff: ash/system/chromeos/power/tablet_power_button_controller.h

Issue 2533373002: Enabled/disable touch screen in TabletPowerButtonController (Closed)
Patch Set: nits Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ 5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_
6 #define ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ 6 #define ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void OnKeyEvent(ui::KeyEvent* event) override; 65 void OnKeyEvent(ui::KeyEvent* event) override;
66 void OnMouseEvent(ui::MouseEvent* event) override; 66 void OnMouseEvent(ui::MouseEvent* event) override;
67 67
68 // Overridden from ui::InputDeviceObserver: 68 // Overridden from ui::InputDeviceObserver:
69 void OnStylusStateChanged(ui::StylusState state) override; 69 void OnStylusStateChanged(ui::StylusState state) override;
70 70
71 // Overrides the tick clock used by |this| for testing. 71 // Overrides the tick clock used by |this| for testing.
72 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock); 72 void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
73 73
74 private: 74 private:
75 // Set backlights to |forced_off| if they aren't already. 75 // Updates the power manager's backlights-forced-off state and enables or
76 void SetBacklightsForcedOff(bool forced_off); 76 // disables the touchscreen. No-op if |backlights_forced_off_| already equals
77 // |forced_off|.
78 void SetDisplayForcedOff(bool forced_off);
77 79
78 // Sends a request to powerd to get the backlights forced off state so that 80 // Sends a request to powerd to get the backlights forced off state so that
79 // |backlights_forced_off_| can be initialized. 81 // |backlights_forced_off_| can be initialized.
80 void GetInitialBacklightsForcedOff(); 82 void GetInitialBacklightsForcedOff();
81 83
82 // Initializes |backlights_forced_off_|. 84 // Initializes |backlights_forced_off_|.
83 void OnGotInitialBacklightsForcedOff(bool is_forced_off); 85 void OnGotInitialBacklightsForcedOff(bool is_forced_off);
84 86
85 // Starts |shutdown_timer_| when the power button is pressed while in 87 // Starts |shutdown_timer_| when the power button is pressed while in
86 // tablet mode. 88 // tablet mode.
(...skipping 29 matching lines...) Expand all
116 LockStateController* controller_; // Not owned. 118 LockStateController* controller_; // Not owned.
117 119
118 base::WeakPtrFactory<TabletPowerButtonController> weak_ptr_factory_; 120 base::WeakPtrFactory<TabletPowerButtonController> weak_ptr_factory_;
119 121
120 DISALLOW_COPY_AND_ASSIGN(TabletPowerButtonController); 122 DISALLOW_COPY_AND_ASSIGN(TabletPowerButtonController);
121 }; 123 };
122 124
123 } // namespace ash 125 } // namespace ash
124 126
125 #endif // ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ 127 #endif // ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/shell/shell_delegate_impl.cc ('k') | ash/system/chromeos/power/tablet_power_button_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698