summaryrefslogtreecommitdiffstats
path: root/remoting/protocol
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-19 06:54:23 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-19 06:54:23 +0000
commit34df2abd18b58f0a0b41fc67237a2f33c75e91b2 (patch)
treefabf473ac21f1c0b6b72ca7705f7ed85b12a9db6 /remoting/protocol
parent0752a82b8e1433ec7b735ea7e6505ed8e993d1ed (diff)
downloadchromium_src-34df2abd18b58f0a0b41fc67237a2f33c75e91b2.zip
chromium_src-34df2abd18b58f0a0b41fc67237a2f33c75e91b2.tar.gz
chromium_src-34df2abd18b58f0a0b41fc67237a2f33c75e91b2.tar.bz2
Use ClipboardFilter in ClientSession to implement auth & disable-input blocking.
This removes the need for ClientSession to implement ClipboardStub and proxy clipboard events itself. BUG=118511 Review URL: https://chromiumcodereview.appspot.com/10831223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol')
-rw-r--r--remoting/protocol/connection_to_client.cc15
-rw-r--r--remoting/protocol/connection_to_client.h15
2 files changed, 22 insertions, 8 deletions
diff --git a/remoting/protocol/connection_to_client.cc b/remoting/protocol/connection_to_client.cc
index e9ce52b..8abbe64 100644
--- a/remoting/protocol/connection_to_client.cc
+++ b/remoting/protocol/connection_to_client.cc
@@ -80,16 +80,31 @@ void ConnectionToClient::set_clipboard_stub(
clipboard_stub_ = clipboard_stub;
}
+ClipboardStub* ConnectionToClient::clipboard_stub() {
+ DCHECK(CalledOnValidThread());
+ return clipboard_stub_;
+}
+
void ConnectionToClient::set_host_stub(protocol::HostStub* host_stub) {
DCHECK(CalledOnValidThread());
host_stub_ = host_stub;
}
+HostStub* ConnectionToClient::host_stub() {
+ DCHECK(CalledOnValidThread());
+ return host_stub_;
+}
+
void ConnectionToClient::set_input_stub(protocol::InputStub* input_stub) {
DCHECK(CalledOnValidThread());
input_stub_ = input_stub;
}
+InputStub* ConnectionToClient::input_stub() {
+ DCHECK(CalledOnValidThread());
+ return input_stub_;
+}
+
void ConnectionToClient::OnSessionStateChange(Session::State state) {
DCHECK(CalledOnValidThread());
diff --git a/remoting/protocol/connection_to_client.h b/remoting/protocol/connection_to_client.h
index 67cfe3b..76cecc4 100644
--- a/remoting/protocol/connection_to_client.h
+++ b/remoting/protocol/connection_to_client.h
@@ -82,21 +82,20 @@ class ConnectionToClient : public base::NonThreadSafe,
// will be called.
virtual void UpdateSequenceNumber(int64 sequence_number);
- // Send encoded update stream data to the viewer.
+ // Get the stubs used by the host to transmit messages to the client.
+ // Note that the audio stub will be NULL if audio is not enabled.
virtual VideoStub* video_stub();
-
- // Send audio stream data to the viewer.
- // Returns NULL if audio is not enabled.
virtual AudioStub* audio_stub();
-
- // Send control data to the viewer/client.
virtual ClientStub* client_stub();
- // Stubs for receiving data from the client.
- // These three setters should be called before Init().
+ // Set/get the stubs which will handle messages we receive from the client.
+ // All stubs MUST be set before the session's channels become connected.
virtual void set_clipboard_stub(ClipboardStub* clipboard_stub);
+ virtual ClipboardStub* clipboard_stub();
virtual void set_host_stub(HostStub* host_stub);
+ virtual HostStub* host_stub();
virtual void set_input_stub(InputStub* input_stub);
+ virtual InputStub* input_stub();
// Session::EventHandler interface.
virtual void OnSessionStateChange(Session::State state) OVERRIDE;