diff options
Diffstat (limited to 'remoting/client/client_context.cc')
-rw-r--r-- | remoting/client/client_context.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/remoting/client/client_context.cc b/remoting/client/client_context.cc index ca12714..f085778 100644 --- a/remoting/client/client_context.cc +++ b/remoting/client/client_context.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,8 +6,8 @@ namespace remoting { -ClientContext::ClientContext() - : main_thread_("ChromotingClientMainThread"), +ClientContext::ClientContext(base::MessageLoopProxy* main_message_loop_proxy) + : main_message_loop_proxy_(main_message_loop_proxy), decode_thread_("ChromotingClientDecodeThread"), network_thread_("ChromotingClientNetworkThread") { } @@ -17,7 +17,6 @@ ClientContext::~ClientContext() { void ClientContext::Start() { // Start all the threads. - main_thread_.Start(); decode_thread_.Start(); network_thread_.StartWithOptions( base::Thread::Options(MessageLoop::TYPE_IO, 0)); @@ -27,11 +26,10 @@ void ClientContext::Stop() { // Stop all the threads. network_thread_.Stop(); decode_thread_.Stop(); - main_thread_.Stop(); } -MessageLoop* ClientContext::main_message_loop() { - return main_thread_.message_loop(); +base::MessageLoopProxy* ClientContext::main_message_loop() { + return main_message_loop_proxy_; } MessageLoop* ClientContext::decode_message_loop() { |