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_CLIENT_CLIENT_CONTEXT_H_ |
| 6 #define REMOTING_CLIENT_CLIENT_CONTEXT_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/thread.h" |
| 11 #include "remoting/jingle_glue/jingle_thread.h" |
| 12 |
| 13 namespace remoting { |
| 14 |
| 15 // A class that manages threads and running context for the chromoting client |
| 16 // process. |
| 17 class ClientContext { |
| 18 public: |
| 19 ClientContext(); |
| 20 virtual ~ClientContext(); |
| 21 |
| 22 void Start(); |
| 23 void Stop(); |
| 24 |
| 25 JingleThread* jingle_thread(); |
| 26 MessageLoop* jingle_message_loop(); |
| 27 |
| 28 MessageLoop* main_message_loop(); |
| 29 MessageLoop* decode_message_loop(); |
| 30 |
| 31 private: |
| 32 // A thread that handles Jingle network operations (used in |
| 33 // JingleHostConnection). |
| 34 JingleThread jingle_thread_; |
| 35 |
| 36 // A thread that handles capture rate control and sending data to the |
| 37 // HostConnection. |
| 38 base::Thread main_thread_; |
| 39 |
| 40 // A thread that handles all decode operations. |
| 41 base::Thread decode_thread_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(ClientContext); |
| 44 }; |
| 45 |
| 46 } // namespace remoting |
| 47 |
| 48 #endif // REMOTING_CLIENT_CLIENT_CONTEXT_H_ |
OLD | NEW |