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

Unified Diff: remoting/host/chromoting_host_context.h

Issue 2829018: Fix thread usage in chromoting host (Closed)
Patch Set: removed useless test Created 10 years, 6 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
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/chromoting_host_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host_context.h
diff --git a/remoting/host/chromoting_host_context.h b/remoting/host/chromoting_host_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..e336c1ed46b951accb6a88b727bea2d6a1c939f6
--- /dev/null
+++ b/remoting/host/chromoting_host_context.h
@@ -0,0 +1,51 @@
+// 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.
+
+#ifndef REMOTING_CHROMOTING_HOST_CONTEXT_H_
+#define REMOTING_CHROMOTING_HOST_CONTEXT_H_
+
+#include <string>
+
+#include "base/thread.h"
+#include "remoting/jingle_glue/jingle_thread.h"
+#include "testing/gtest/include/gtest/gtest_prod.h"
+
+namespace remoting {
+
+// A class that manages threads and running context for the chromoting host
+// process.
+class ChromotingHostContext {
+ public:
+ ChromotingHostContext();
+ virtual ~ChromotingHostContext();
+
+ virtual void Start();
+ virtual void Stop();
+
+ virtual JingleThread* jingle_thread();
+ virtual MessageLoop* main_message_loop();
+ virtual MessageLoop* capture_message_loop();
+ virtual MessageLoop* encode_message_loop();
+
+ private:
+ FRIEND_TEST(ChromotingHostContextTest, StartAndStop);
+
+ // A thread that host network operations.
+ JingleThread jingle_thread_;
+
+ // A thread that host ChromotingHost.
+ base::Thread main_thread_;
+
+ // A thread that host all capture operations.
+ base::Thread capture_thread_;
+
+ // A thread that host all encode operations.
+ base::Thread encode_thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/chromoting_host_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698