| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 
|  | 2 // Use of this source code is governed by a BSD-style license that can be | 
|  | 3 // found in the LICENSE file. | 
|  | 4 | 
|  | 5 #ifndef REMOTING_CHROMOTING_HOST_CONTEXT_H_ | 
|  | 6 #define REMOTING_CHROMOTING_HOST_CONTEXT_H_ | 
|  | 7 | 
|  | 8 #include <string> | 
|  | 9 | 
|  | 10 #include "base/thread.h" | 
|  | 11 #include "remoting/jingle_glue/jingle_thread.h" | 
|  | 12 #include "testing/gtest/include/gtest/gtest_prod.h" | 
|  | 13 | 
|  | 14 namespace remoting { | 
|  | 15 | 
|  | 16 // A class that manages threads and running context for the chromoting host | 
|  | 17 // process. | 
|  | 18 class ChromotingHostContext { | 
|  | 19  public: | 
|  | 20   ChromotingHostContext(); | 
|  | 21   virtual ~ChromotingHostContext(); | 
|  | 22 | 
|  | 23   virtual void Start(); | 
|  | 24   virtual void Stop(); | 
|  | 25 | 
|  | 26   virtual JingleThread* jingle_thread(); | 
|  | 27   virtual MessageLoop* main_message_loop(); | 
|  | 28   virtual MessageLoop* capture_message_loop(); | 
|  | 29   virtual MessageLoop* encode_message_loop(); | 
|  | 30 | 
|  | 31  private: | 
|  | 32   FRIEND_TEST(ChromotingHostContextTest, StartAndStop); | 
|  | 33 | 
|  | 34   // A thread that host network operations. | 
|  | 35   JingleThread jingle_thread_; | 
|  | 36 | 
|  | 37   // A thread that host ChromotingHost. | 
|  | 38   base::Thread main_thread_; | 
|  | 39 | 
|  | 40   // A thread that host all capture operations. | 
|  | 41   base::Thread capture_thread_; | 
|  | 42 | 
|  | 43   // A thread that host all encode operations. | 
|  | 44   base::Thread encode_thread_; | 
|  | 45 | 
|  | 46   DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext); | 
|  | 47 }; | 
|  | 48 | 
|  | 49 }  // namespace remoting | 
|  | 50 | 
|  | 51 #endif  // REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_ | 
| OLD | NEW | 
|---|