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

Side by Side Diff: remoting/host/client_connection.h

Issue 4229003: Add VideoReader and VideoWriter interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_connection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_CLIENT_CONNECTION_H_ 5 #ifndef REMOTING_HOST_CLIENT_CONNECTION_H_
6 #define REMOTING_HOST_CLIENT_CONNECTION_H_ 6 #define REMOTING_HOST_CLIENT_CONNECTION_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/ref_counted.h" 12 #include "base/ref_counted.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "remoting/proto/internal.pb.h" 14 #include "remoting/proto/internal.pb.h"
15 #include "remoting/protocol/chromotocol_connection.h" 15 #include "remoting/protocol/chromotocol_connection.h"
16 #include "remoting/protocol/message_reader.h" 16 #include "remoting/protocol/message_reader.h"
17 #include "remoting/protocol/stream_writer.h" 17 #include "remoting/protocol/stream_writer.h"
18 #include "remoting/protocol/video_writer.h"
18 19
19 namespace remoting { 20 namespace remoting {
20 21
21 // This class represents a remote viewer connected to the chromoting host 22 // This class represents a remote viewer connected to the chromoting host
22 // through a libjingle connection. A viewer object is responsible for sending 23 // through a libjingle connection. A viewer object is responsible for sending
23 // screen updates and other messages to the remote viewer. It is also 24 // screen updates and other messages to the remote viewer. It is also
24 // responsible for receiving and parsing data from the remote viewer and 25 // responsible for receiving and parsing data from the remote viewer and
25 // delegating events to the event handler. 26 // delegating events to the event handler.
26 class ClientConnection : public base::RefCountedThreadSafe<ClientConnection> { 27 class ClientConnection : public base::RefCountedThreadSafe<ClientConnection> {
27 public: 28 public:
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void StateChangeTask(ChromotocolConnection::State state); 94 void StateChangeTask(ChromotocolConnection::State state);
94 95
95 // Process a data buffer received from libjingle. 96 // Process a data buffer received from libjingle.
96 void MessageReceivedTask(ChromotingClientMessage* message); 97 void MessageReceivedTask(ChromotingClientMessage* message);
97 98
98 void OnClosed(); 99 void OnClosed();
99 100
100 // The libjingle channel used to send and receive data from the remote client. 101 // The libjingle channel used to send and receive data from the remote client.
101 scoped_refptr<ChromotocolConnection> connection_; 102 scoped_refptr<ChromotocolConnection> connection_;
102 103
104 ControlStreamWriter control_writer_;
103 MessageReader event_reader_; 105 MessageReader event_reader_;
104 VideoStreamWriter video_writer_; 106 scoped_ptr<VideoWriter> video_writer_;
105 107
106 // The message loop that this object runs on. 108 // The message loop that this object runs on.
107 MessageLoop* loop_; 109 MessageLoop* loop_;
108 110
109 // Event handler for handling events sent from this object. 111 // Event handler for handling events sent from this object.
110 EventHandler* handler_; 112 EventHandler* handler_;
111 113
112 DISALLOW_COPY_AND_ASSIGN(ClientConnection); 114 DISALLOW_COPY_AND_ASSIGN(ClientConnection);
113 }; 115 };
114 116
115 } // namespace remoting 117 } // namespace remoting
116 118
117 #endif // REMOTING_HOST_CLIENT_CONNECTION_H_ 119 #endif // REMOTING_HOST_CLIENT_CONNECTION_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698