diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-19 14:55:37 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-19 14:55:37 +0000 |
commit | a5d181f50c2543ac837623a0b619a6a487913fa5 (patch) | |
tree | 7ba018efcd8bbfb51478b5dd1bf0b5ed66bddf36 /remoting/protocol/client_control_dispatcher.cc | |
parent | 48b6601cb7a02a3cd6ff74c8f9d5f222ddc2304f (diff) | |
download | chromium_src-a5d181f50c2543ac837623a0b619a6a487913fa5.zip chromium_src-a5d181f50c2543ac837623a0b619a6a487913fa5.tar.gz chromium_src-a5d181f50c2543ac837623a0b619a6a487913fa5.tar.bz2 |
Set the initial resolution of an RDP session to the client screen resolution if it is available.
Changes in this CL:
- The version of the control channel is increased to 3. This allows the host and client to tell if the peer supports capabilities negotiation or not.
- The client and host negotiate supported capabilities by sending each other a list of the supported capabilities. Capabilities supported by both client and host are assumed to be enabled.
- The client plugin and webapp negotiate the list of capabilities supported by the client. The webapp has the final word.
- The DesktopEnvironment interface was extended to provide the list of all supported capabilities and receive the results of negotiation with the client.
- Added the 'sendInitialResolution' capability. When it is enabled the client sends its screen resolution to the host once the connection has been established.
- DesktopSessionProxy now waits for the client screen resolution when the 'sendInitialResolution' capability is enabled.
BUG=230893
Review URL: https://chromiumcodereview.appspot.com/13932020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/client_control_dispatcher.cc')
-rw-r--r-- | remoting/protocol/client_control_dispatcher.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/remoting/protocol/client_control_dispatcher.cc b/remoting/protocol/client_control_dispatcher.cc index 6830981..580ea28 100644 --- a/remoting/protocol/client_control_dispatcher.cc +++ b/remoting/protocol/client_control_dispatcher.cc @@ -60,6 +60,13 @@ void ClientControlDispatcher::ControlAudio(const AudioControl& audio_control) { writer_.Write(SerializeAndFrameMessage(message), base::Closure()); } +void ClientControlDispatcher::SetCapabilities( + const Capabilities& capabilities) { + ControlMessage message; + message.mutable_capabilities()->CopyFrom(capabilities); + writer_.Write(SerializeAndFrameMessage(message), base::Closure()); +} + void ClientControlDispatcher::OnMessageReceived( scoped_ptr<ControlMessage> message, const base::Closure& done_task) { DCHECK(client_stub_); @@ -68,6 +75,8 @@ void ClientControlDispatcher::OnMessageReceived( if (message->has_clipboard_event()) { clipboard_stub_->InjectClipboardEvent(message->clipboard_event()); + } else if (message->has_capabilities()) { + client_stub_->SetCapabilities(message->capabilities()); } else if (message->has_cursor_shape()) { client_stub_->SetCursorShape(message->cursor_shape()); } else { |