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

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

Issue 2533373002: Enabled/disable touch screen in TabletPowerButtonController (Closed)
Patch Set: incorporate comments from gab@ and afakhry@ 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 // Set backlights to |forced_off| and the corresponding enabled state of
Daniel Erat 2016/12/02 21:48:56 nit: maybe this? // Updates the power manager's b
Qiang(Joe) Xu 2016/12/02 23:55:10 Done.
76 void SetBacklightsForcedOff(bool forced_off); 76 // touchscreen if they aren't already.
77 void SetDisplayForcedOff(bool forced_off);
77 78
78 // Sends a request to powerd to get the backlights forced off state so that 79 // Sends a request to powerd to get the backlights forced off state so that
79 // |backlights_forced_off_| can be initialized. 80 // |backlights_forced_off_| can be initialized.
80 void GetInitialBacklightsForcedOff(); 81 void GetInitialBacklightsForcedOff();
81 82
82 // Initializes |backlights_forced_off_|. 83 // Initializes |backlights_forced_off_|.
83 void OnGotInitialBacklightsForcedOff(bool is_forced_off); 84 void OnGotInitialBacklightsForcedOff(bool is_forced_off);
84 85
85 // Starts |shutdown_timer_| when the power button is pressed while in 86 // Starts |shutdown_timer_| when the power button is pressed while in
86 // tablet mode. 87 // tablet mode.
(...skipping 29 matching lines...) Expand all
116 LockStateController* controller_; // Not owned. 117 LockStateController* controller_; // Not owned.
117 118
118 base::WeakPtrFactory<TabletPowerButtonController> weak_ptr_factory_; 119 base::WeakPtrFactory<TabletPowerButtonController> weak_ptr_factory_;
119 120
120 DISALLOW_COPY_AND_ASSIGN(TabletPowerButtonController); 121 DISALLOW_COPY_AND_ASSIGN(TabletPowerButtonController);
121 }; 122 };
122 123
123 } // namespace ash 124 } // namespace ash
124 125
125 #endif // ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ 126 #endif // ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698