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 #include "remoting/host/resizing_host_observer.h" | 5 #include "remoting/host/resizing_host_observer.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "remoting/host/desktop_resizer.h" | 12 #include "remoting/host/desktop_resizer.h" |
13 #include "remoting/host/screen_resolution.h" | 13 #include "remoting/host/screen_resolution.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Minimum amount of time to wait between desktop resizes. Note that this | 17 // Minimum amount of time to wait between desktop resizes. Note that this |
18 // constant is duplicated by the ResizingHostObserverTest.RateLimited | 18 // constant is duplicated by the ResizingHostObserverTest.RateLimited |
19 // unit-test and must be kept in sync. | 19 // unit-test and must be kept in sync. |
20 const int kMinimumResizeIntervalMs = 1000; | 20 const int kMinimumResizeIntervalMs = 1000; |
21 | 21 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // Update the time of last resize to allow it to be rate-limited. | 165 // Update the time of last resize to allow it to be rate-limited. |
166 previous_resize_time_ = now; | 166 previous_resize_time_ = now; |
167 } | 167 } |
168 | 168 |
169 void ResizingHostObserver::SetNowFunctionForTesting( | 169 void ResizingHostObserver::SetNowFunctionForTesting( |
170 const base::Callback<base::Time(void)>& now_function) { | 170 const base::Callback<base::Time(void)>& now_function) { |
171 now_function_ = now_function; | 171 now_function_ = now_function; |
172 } | 172 } |
173 | 173 |
174 } // namespace remoting | 174 } // namespace remoting |
OLD | NEW |