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

Side by Side Diff: remoting/protocol/client_control_dispatcher.cc

Issue 12220092: Rename ClientDimensions to ClientResolution and add pixel-size and DPI fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typos in ChromotingInstance. Created 7 years, 10 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 | Annotate | Revision Log
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 #include "remoting/protocol/client_control_dispatcher.h" 5 #include "remoting/protocol/client_control_dispatcher.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "net/socket/stream_socket.h" 10 #include "net/socket/stream_socket.h"
(...skipping 23 matching lines...) Expand all
34 &ClientControlDispatcher::OnMessageReceived, base::Unretained(this))); 34 &ClientControlDispatcher::OnMessageReceived, base::Unretained(this)));
35 } 35 }
36 36
37 void ClientControlDispatcher::InjectClipboardEvent( 37 void ClientControlDispatcher::InjectClipboardEvent(
38 const ClipboardEvent& event) { 38 const ClipboardEvent& event) {
39 ControlMessage message; 39 ControlMessage message;
40 message.mutable_clipboard_event()->CopyFrom(event); 40 message.mutable_clipboard_event()->CopyFrom(event);
41 writer_.Write(SerializeAndFrameMessage(message), base::Closure()); 41 writer_.Write(SerializeAndFrameMessage(message), base::Closure());
42 } 42 }
43 43
44 void ClientControlDispatcher::NotifyClientDimensions( 44 void ClientControlDispatcher::NotifyClientResolution(
45 const ClientDimensions& dimensions) { 45 const ClientResolution& resolution) {
46 ControlMessage message; 46 ControlMessage message;
47 message.mutable_client_dimensions()->CopyFrom(dimensions); 47 message.mutable_client_resolution()->CopyFrom(resolution);
48 writer_.Write(SerializeAndFrameMessage(message), base::Closure()); 48 writer_.Write(SerializeAndFrameMessage(message), base::Closure());
49 } 49 }
50 50
51 void ClientControlDispatcher::ControlVideo(const VideoControl& video_control) { 51 void ClientControlDispatcher::ControlVideo(const VideoControl& video_control) {
52 ControlMessage message; 52 ControlMessage message;
53 message.mutable_video_control()->CopyFrom(video_control); 53 message.mutable_video_control()->CopyFrom(video_control);
54 writer_.Write(SerializeAndFrameMessage(message), base::Closure()); 54 writer_.Write(SerializeAndFrameMessage(message), base::Closure());
55 } 55 }
56 56
57 void ClientControlDispatcher::ControlAudio(const AudioControl& audio_control) { 57 void ClientControlDispatcher::ControlAudio(const AudioControl& audio_control) {
(...skipping 12 matching lines...) Expand all
70 clipboard_stub_->InjectClipboardEvent(message->clipboard_event()); 70 clipboard_stub_->InjectClipboardEvent(message->clipboard_event());
71 } else if (message->has_cursor_shape()) { 71 } else if (message->has_cursor_shape()) {
72 client_stub_->SetCursorShape(message->cursor_shape()); 72 client_stub_->SetCursorShape(message->cursor_shape());
73 } else { 73 } else {
74 LOG(WARNING) << "Unknown control message received."; 74 LOG(WARNING) << "Unknown control message received.";
75 } 75 }
76 } 76 }
77 77
78 } // namespace protocol 78 } // namespace protocol
79 } // namespace remoting 79 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698