| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromoting_host_context.h" | 5 #include "remoting/host/chromoting_host_context.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 MessageLoop* ChromotingHostContext::main_message_loop() { | 44 MessageLoop* ChromotingHostContext::main_message_loop() { |
| 45 return main_thread_.message_loop(); | 45 return main_thread_.message_loop(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 MessageLoop* ChromotingHostContext::encode_message_loop() { | 48 MessageLoop* ChromotingHostContext::encode_message_loop() { |
| 49 return encode_thread_.message_loop(); | 49 return encode_thread_.message_loop(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 MessageLoop* ChromotingHostContext::network_message_loop() { | 52 base::MessageLoopProxy* ChromotingHostContext::network_message_loop() { |
| 53 return jingle_thread_.message_loop(); | 53 return jingle_thread_.message_loop_proxy(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 MessageLoop* ChromotingHostContext::desktop_message_loop() { | 56 MessageLoop* ChromotingHostContext::desktop_message_loop() { |
| 57 return desktop_thread_.message_loop(); | 57 return desktop_thread_.message_loop(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void ChromotingHostContext::SetUITaskPostFunction( | 60 void ChromotingHostContext::SetUITaskPostFunction( |
| 61 const UIThreadPostTaskFunction& poster) { | 61 const UIThreadPostTaskFunction& poster) { |
| 62 ui_poster_ = poster; | 62 ui_poster_ = poster; |
| 63 ui_main_thread_id_ = base::PlatformThread::CurrentId(); | 63 ui_main_thread_id_ = base::PlatformThread::CurrentId(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 78 main_message_loop()->PostDelayedTask(from_here, base::Bind( | 78 main_message_loop()->PostDelayedTask(from_here, base::Bind( |
| 79 &ChromotingHostContext::PostTaskToUIThread, base::Unretained(this), | 79 &ChromotingHostContext::PostTaskToUIThread, base::Unretained(this), |
| 80 from_here, task), delay_ms); | 80 from_here, task), delay_ms); |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool ChromotingHostContext::IsUIThread() const { | 83 bool ChromotingHostContext::IsUIThread() const { |
| 84 return ui_main_thread_id_ == base::PlatformThread::CurrentId(); | 84 return ui_main_thread_id_ == base::PlatformThread::CurrentId(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace remoting | 87 } // namespace remoting |
| OLD | NEW |