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

Side by Side Diff: remoting/protocol/connection_to_client.h

Issue 850983002: Implement video frame acknowledgements in the chromoting protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PROTOCOL_CONNECTION_TO_CLIENT_H_ 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ 6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 #include "base/threading/non_thread_safe.h" 14 #include "base/threading/non_thread_safe.h"
15 #include "remoting/protocol/audio_writer.h" 15 #include "remoting/protocol/audio_writer.h"
16 #include "remoting/protocol/session.h" 16 #include "remoting/protocol/session.h"
17 17
18 namespace remoting { 18 namespace remoting {
19 namespace protocol { 19 namespace protocol {
20 20
21 class ClientStub; 21 class ClientStub;
22 class ClipboardStub; 22 class ClipboardStub;
23 class HostControlDispatcher; 23 class HostControlDispatcher;
24 class HostEventDispatcher; 24 class HostEventDispatcher;
25 class HostStub; 25 class HostStub;
26 class HostVideoDispatcher; 26 class HostVideoDispatcher;
27 class InputStub; 27 class InputStub;
28 class VideoStub; 28 class VideoSender;
29 29
30 // This class represents a remote viewer connection to the chromoting 30 // This class represents a remote viewer connection to the chromoting
31 // host. It sets up all protocol channels and connects them to the 31 // host. It sets up all protocol channels and connects them to the
32 // stubs. 32 // stubs.
33 class ConnectionToClient : public base::NonThreadSafe, 33 class ConnectionToClient : public base::NonThreadSafe,
34 public Session::EventHandler, 34 public Session::EventHandler,
35 public ChannelDispatcherBase::EventHandler { 35 public ChannelDispatcherBase::EventHandler {
36 public: 36 public:
37 class EventHandler { 37 class EventHandler {
38 public: 38 public:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 virtual void Disconnect(); 81 virtual void Disconnect();
82 82
83 // Callback for HostEventDispatcher to be called with a timestamp for each 83 // Callback for HostEventDispatcher to be called with a timestamp for each
84 // received event. 84 // received event.
85 virtual void OnEventTimestamp(int64 timestamp); 85 virtual void OnEventTimestamp(int64 timestamp);
86 86
87 // Get the stubs used by the host to transmit messages to the client. 87 // Get the stubs used by the host to transmit messages to the client.
88 // The stubs must not be accessed before OnConnectionAuthenticated(), or 88 // The stubs must not be accessed before OnConnectionAuthenticated(), or
89 // after OnConnectionClosed(). 89 // after OnConnectionClosed().
90 // Note that the audio stub will be nullptr if audio is not enabled. 90 // Note that the audio stub will be nullptr if audio is not enabled.
91 virtual VideoStub* video_stub(); 91 virtual VideoSender* video_sender();
92 virtual AudioStub* audio_stub(); 92 virtual AudioStub* audio_stub();
93 virtual ClientStub* client_stub(); 93 virtual ClientStub* client_stub();
94 94
95 // Set/get the stubs which will handle messages we receive from the client. 95 // Set/get the stubs which will handle messages we receive from the client.
96 // All stubs MUST be set before the session's channels become connected. 96 // All stubs MUST be set before the session's channels become connected.
97 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub); 97 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub);
98 virtual ClipboardStub* clipboard_stub(); 98 virtual ClipboardStub* clipboard_stub();
99 virtual void set_host_stub(HostStub* host_stub); 99 virtual void set_host_stub(HostStub* host_stub);
100 virtual HostStub* host_stub(); 100 virtual HostStub* host_stub();
101 virtual void set_input_stub(InputStub* input_stub); 101 virtual void set_input_stub(InputStub* input_stub);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 scoped_ptr<HostVideoDispatcher> video_dispatcher_; 135 scoped_ptr<HostVideoDispatcher> video_dispatcher_;
136 scoped_ptr<AudioWriter> audio_writer_; 136 scoped_ptr<AudioWriter> audio_writer_;
137 137
138 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); 138 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient);
139 }; 139 };
140 140
141 } // namespace protocol 141 } // namespace protocol
142 } // namespace remoting 142 } // namespace remoting
143 143
144 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ 144 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698