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/it2me_host_user_interface.h" | 5 #include "remoting/host/it2me_host_user_interface.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "remoting/host/chromoting_host.h" | 8 #include "remoting/host/chromoting_host.h" |
9 #include "remoting/host/chromoting_host_context.h" | 9 #include "remoting/host/chromoting_host_context.h" |
10 #include "remoting/host/continue_window.h" | 10 #include "remoting/host/continue_window.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 } // namespace | 23 } // namespace |
24 | 24 |
25 namespace remoting { | 25 namespace remoting { |
26 | 26 |
27 class It2MeHostUserInterface::TimerTask { | 27 class It2MeHostUserInterface::TimerTask { |
28 public: | 28 public: |
29 TimerTask(base::MessageLoopProxy* message_loop, | 29 TimerTask(base::MessageLoopProxy* message_loop, |
30 const base::Closure& task, | 30 const base::Closure& task, |
31 int delay_ms) | 31 int delay_ms) |
32 : thread_proxy_(message_loop) { | 32 : thread_proxy_(message_loop) { |
33 thread_proxy_.PostDelayedTask(FROM_HERE, task, delay_ms); | 33 thread_proxy_.PostDelayedTask( |
| 34 FROM_HERE, task, base::TimeDelta::FromMilliseconds(delay_ms)); |
34 } | 35 } |
35 | 36 |
36 private: | 37 private: |
37 ScopedThreadProxy thread_proxy_; | 38 ScopedThreadProxy thread_proxy_; |
38 }; | 39 }; |
39 | 40 |
40 | 41 |
41 It2MeHostUserInterface::It2MeHostUserInterface(ChromotingHostContext* context) | 42 It2MeHostUserInterface::It2MeHostUserInterface(ChromotingHostContext* context) |
42 : HostUserInterface(context) { | 43 : HostUserInterface(context) { |
43 } | 44 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 ui_message_loop(), | 150 ui_message_loop(), |
150 base::Bind(&It2MeHostUserInterface::OnContinueWindowTimer, | 151 base::Bind(&It2MeHostUserInterface::OnContinueWindowTimer, |
151 base::Unretained(this)), | 152 base::Unretained(this)), |
152 kContinueWindowShowTimeoutMs)); | 153 kContinueWindowShowTimeoutMs)); |
153 } else { | 154 } else { |
154 timer_task_.reset(); | 155 timer_task_.reset(); |
155 } | 156 } |
156 } | 157 } |
157 | 158 |
158 } // namespace remoting | 159 } // namespace remoting |
OLD | NEW |