Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Unified Diff: remoting/client/client_context.cc

Issue 2861047: Refactor the client code. Move all x11-related code into X11View and create... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/client/client_context.cc
===================================================================
--- remoting/client/client_context.cc (revision 0)
+++ remoting/client/client_context.cc (revision 0)
@@ -0,0 +1,52 @@
+// Copyright (c) 2010 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.
+
+#include "remoting/client/client_context.h"
+
+#include <string>
+
+#include "base/thread.h"
+#include "remoting/jingle_glue/jingle_thread.h"
+
+namespace remoting {
+
+ClientContext::ClientContext()
+ : main_thread_("ChromotingClientMainThread"),
+ decode_thread_("ChromotingClientDecodeThread") {
+}
+
+ClientContext::~ClientContext() {
+}
+
+void ClientContext::Start() {
+ // Start all the threads.
+ main_thread_.Start();
+ decode_thread_.Start();
+ jingle_thread_.Start();
+}
+
+void ClientContext::Stop() {
+ // Stop all the threads.
+ jingle_thread_.Stop();
+ decode_thread_.Stop();
+ main_thread_.Stop();
+}
+
+JingleThread* ClientContext::jingle_thread() {
+ return &jingle_thread_;
+}
+
+MessageLoop* ClientContext::jingle_message_loop() {
+ return jingle_thread_.message_loop();
+}
+
+MessageLoop* ClientContext::main_message_loop() {
+ return main_thread_.message_loop();
+}
+
+MessageLoop* ClientContext::decode_message_loop() {
+ return decode_thread_.message_loop();
+}
+
+} // namespace remoting
Property changes on: remoting/client/client_context.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698