OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ | 5 #ifndef ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ |
6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ | 6 #define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/accelerometer/accelerometer_observer.h" | 8 #include "ash/accelerometer/accelerometer_observer.h" |
9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
10 #include "ash/display/display_controller.h" | 10 #include "ash/display/display_controller.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 // TODO(jonross): move this into the destructor. Currently separated as | 104 // TODO(jonross): move this into the destructor. Currently separated as |
105 // ShellOberver notifies of maximize mode ending, and the observers end up | 105 // ShellOberver notifies of maximize mode ending, and the observers end up |
106 // attempting to access MaximizeModeController via the Shell. If done in | 106 // attempting to access MaximizeModeController via the Shell. If done in |
107 // destructor the controller is null, and the observers segfault. | 107 // destructor the controller is null, and the observers segfault. |
108 // Shuts down down the MaximizeModeWindowManager and notifies all observers. | 108 // Shuts down down the MaximizeModeWindowManager and notifies all observers. |
109 void Shutdown(); | 109 void Shutdown(); |
110 | 110 |
111 // AccelerometerObserver: | 111 // AccelerometerObserver: |
112 virtual void OnAccelerometerUpdated( | 112 virtual void OnAccelerometerUpdated( |
113 const ui::AccelerometerUpdate& update) OVERRIDE; | 113 const ui::AccelerometerUpdate& update) override; |
114 | 114 |
115 // ShellObserver: | 115 // ShellObserver: |
116 virtual void OnAppTerminating() OVERRIDE; | 116 virtual void OnAppTerminating() override; |
117 virtual void OnMaximizeModeStarted() OVERRIDE; | 117 virtual void OnMaximizeModeStarted() override; |
118 virtual void OnMaximizeModeEnded() OVERRIDE; | 118 virtual void OnMaximizeModeEnded() override; |
119 | 119 |
120 // DisplayController::Observer: | 120 // DisplayController::Observer: |
121 virtual void OnDisplayConfigurationChanged() OVERRIDE; | 121 virtual void OnDisplayConfigurationChanged() override; |
122 | 122 |
123 #if defined(OS_CHROMEOS) | 123 #if defined(OS_CHROMEOS) |
124 // PowerManagerClient::Observer: | 124 // PowerManagerClient::Observer: |
125 virtual void LidEventReceived(bool open, | 125 virtual void LidEventReceived(bool open, |
126 const base::TimeTicks& time) OVERRIDE; | 126 const base::TimeTicks& time) override; |
127 virtual void SuspendImminent() OVERRIDE; | 127 virtual void SuspendImminent() override; |
128 virtual void SuspendDone(const base::TimeDelta& sleep_duration) OVERRIDE; | 128 virtual void SuspendDone(const base::TimeDelta& sleep_duration) override; |
129 #endif // OS_CHROMEOS | 129 #endif // OS_CHROMEOS |
130 | 130 |
131 private: | 131 private: |
132 friend class MaximizeModeControllerTest; | 132 friend class MaximizeModeControllerTest; |
133 friend class MaximizeModeWindowManagerTest; | 133 friend class MaximizeModeWindowManagerTest; |
134 friend class test::MultiUserWindowManagerChromeOSTest; | 134 friend class test::MultiUserWindowManagerChromeOSTest; |
135 | 135 |
136 // Set the TickClock. This is only to be used by tests that need to | 136 // Set the TickClock. This is only to be used by tests that need to |
137 // artificially and deterministically control the current time. | 137 // artificially and deterministically control the current time. |
138 void SetTickClockForTest(scoped_ptr<base::TickClock> tick_clock); | 138 void SetTickClockForTest(scoped_ptr<base::TickClock> tick_clock); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 217 |
218 // Tracks when the lid is closed. Used to prevent entering maximize mode. | 218 // Tracks when the lid is closed. Used to prevent entering maximize mode. |
219 bool lid_is_closed_; | 219 bool lid_is_closed_; |
220 | 220 |
221 DISALLOW_COPY_AND_ASSIGN(MaximizeModeController); | 221 DISALLOW_COPY_AND_ASSIGN(MaximizeModeController); |
222 }; | 222 }; |
223 | 223 |
224 } // namespace ash | 224 } // namespace ash |
225 | 225 |
226 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ | 226 #endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_ |
OLD | NEW |