OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ash/display/resolution_notification_controller.h" | 5 #include "ash/display/resolution_notification_controller.h" |
6 | 6 |
7 #include "ash/display/display_info.h" | 7 #include "ash/display/display_info.h" |
8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/system/system_notifier.h" | 10 #include "ash/system/system_notifier.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // The callback when accept is chosen. | 115 // The callback when accept is chosen. |
116 base::Closure accept_callback; | 116 base::Closure accept_callback; |
117 | 117 |
118 // The remaining timeout in seconds. 0 if the change does not time out. | 118 // The remaining timeout in seconds. 0 if the change does not time out. |
119 uint8 timeout_count; | 119 uint8 timeout_count; |
120 | 120 |
121 // The timer to invoke OnTimerTick() every second. This cannot be | 121 // The timer to invoke OnTimerTick() every second. This cannot be |
122 // OneShotTimer since the message contains text "automatically closed in xx | 122 // OneShotTimer since the message contains text "automatically closed in xx |
123 // seconds..." which has to be updated every second. | 123 // seconds..." which has to be updated every second. |
124 base::RepeatingTimer<ResolutionNotificationController> timer; | 124 base::RepeatingTimer timer; |
125 | 125 |
126 private: | 126 private: |
127 DISALLOW_COPY_AND_ASSIGN(ResolutionChangeInfo); | 127 DISALLOW_COPY_AND_ASSIGN(ResolutionChangeInfo); |
128 }; | 128 }; |
129 | 129 |
130 ResolutionNotificationController::ResolutionChangeInfo::ResolutionChangeInfo( | 130 ResolutionNotificationController::ResolutionChangeInfo::ResolutionChangeInfo( |
131 int64 display_id, | 131 int64 display_id, |
132 const DisplayMode& old_resolution, | 132 const DisplayMode& old_resolution, |
133 const DisplayMode& new_resolution, | 133 const DisplayMode& new_resolution, |
134 const base::Closure& accept_callback) | 134 const base::Closure& accept_callback) |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 this, | 300 this, |
301 &ResolutionNotificationController::OnTimerTick); | 301 &ResolutionNotificationController::OnTimerTick); |
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 void ResolutionNotificationController::SuppressTimerForTest() { | 305 void ResolutionNotificationController::SuppressTimerForTest() { |
306 g_use_timer = false; | 306 g_use_timer = false; |
307 } | 307 } |
308 | 308 |
309 } // namespace ash | 309 } // namespace ash |
OLD | NEW |