OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WM_POWER_BUTTON_CONTROLLER_H_ | 5 #ifndef ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
6 #define ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 6 #define ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/accelerators/accelerator_controller.h" | 8 #include "ash/accelerators/accelerator_controller.h" |
9 #include "ash/accelerators/accelerator_table.h" | 9 #include "ash/accelerators/accelerator_table.h" |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 } | 57 } |
58 | 58 |
59 // Called when the current screen brightness changes. | 59 // Called when the current screen brightness changes. |
60 void OnScreenBrightnessChanged(double percent); | 60 void OnScreenBrightnessChanged(double percent); |
61 | 61 |
62 // Called when the power or lock buttons are pressed or released. | 62 // Called when the power or lock buttons are pressed or released. |
63 void OnPowerButtonEvent(bool down, const base::TimeTicks& timestamp); | 63 void OnPowerButtonEvent(bool down, const base::TimeTicks& timestamp); |
64 void OnLockButtonEvent(bool down, const base::TimeTicks& timestamp); | 64 void OnLockButtonEvent(bool down, const base::TimeTicks& timestamp); |
65 | 65 |
66 // ui::EventHandler: | 66 // ui::EventHandler: |
67 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 67 virtual void OnKeyEvent(ui::KeyEvent* event) override; |
68 | 68 |
69 #if defined(OS_CHROMEOS) | 69 #if defined(OS_CHROMEOS) |
70 // Overriden from ui::DisplayConfigurator::Observer: | 70 // Overriden from ui::DisplayConfigurator::Observer: |
71 virtual void OnDisplayModeChanged( | 71 virtual void OnDisplayModeChanged( |
72 const ui::DisplayConfigurator::DisplayStateList& outputs) OVERRIDE; | 72 const ui::DisplayConfigurator::DisplayStateList& outputs) override; |
73 #endif | 73 #endif |
74 | 74 |
75 private: | 75 private: |
76 friend class test::PowerButtonControllerTest; | 76 friend class test::PowerButtonControllerTest; |
77 | 77 |
78 // Are the power or lock buttons currently held? | 78 // Are the power or lock buttons currently held? |
79 bool power_button_down_; | 79 bool power_button_down_; |
80 bool lock_button_down_; | 80 bool lock_button_down_; |
81 | 81 |
82 // True when the volume down button is being held down. | 82 // True when the volume down button is being held down. |
(...skipping 15 matching lines...) Expand all Loading... |
98 bool enable_quick_lock_; | 98 bool enable_quick_lock_; |
99 | 99 |
100 LockStateController* controller_; // Not owned. | 100 LockStateController* controller_; // Not owned. |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); | 102 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace ash | 105 } // namespace ash |
106 | 106 |
107 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 107 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
OLD | NEW |