OLD | NEW |
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/client/chromoting_client.h" | 5 #include "remoting/client/chromoting_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "remoting/client/chromoting_view.h" | 8 #include "remoting/client/chromoting_view.h" |
9 #include "remoting/client/client_context.h" | 9 #include "remoting/client/client_context.h" |
10 #include "remoting/client/rectangle_update_decoder.h" | 10 #include "remoting/client/rectangle_update_decoder.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 ChromotingStats* ChromotingClient::GetStats() { | 100 ChromotingStats* ChromotingClient::GetStats() { |
101 return &stats_; | 101 return &stats_; |
102 } | 102 } |
103 | 103 |
104 void ChromotingClient::InjectClipboardEvent( | 104 void ChromotingClient::InjectClipboardEvent( |
105 const protocol::ClipboardEvent& event) { | 105 const protocol::ClipboardEvent& event) { |
106 view_->GetClipboardStub()->InjectClipboardEvent(event); | 106 view_->GetClipboardStub()->InjectClipboardEvent(event); |
107 } | 107 } |
108 | 108 |
| 109 void ChromotingClient::SetCursorShape( |
| 110 const protocol::CursorShapeInfo& cursor_shape) { |
| 111 view_->GetCursorShapeStub()->SetCursorShape(cursor_shape); |
| 112 } |
| 113 |
109 void ChromotingClient::ProcessVideoPacket(scoped_ptr<VideoPacket> packet, | 114 void ChromotingClient::ProcessVideoPacket(scoped_ptr<VideoPacket> packet, |
110 const base::Closure& done) { | 115 const base::Closure& done) { |
111 DCHECK(message_loop()->BelongsToCurrentThread()); | 116 DCHECK(message_loop()->BelongsToCurrentThread()); |
112 | 117 |
113 // If the video packet is empty then drop it. Empty packets are used to | 118 // If the video packet is empty then drop it. Empty packets are used to |
114 // maintain activity on the network. | 119 // maintain activity on the network. |
115 if (!packet->has_data() || packet->data().size() == 0) { | 120 if (!packet->has_data() || packet->data().size() == 0) { |
116 done.Run(); | 121 done.Run(); |
117 return; | 122 return; |
118 } | 123 } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 thread_proxy_.PostTask(FROM_HERE, base::Bind( | 218 thread_proxy_.PostTask(FROM_HERE, base::Bind( |
214 &ChromotingClient::Initialize, base::Unretained(this))); | 219 &ChromotingClient::Initialize, base::Unretained(this))); |
215 return; | 220 return; |
216 } | 221 } |
217 | 222 |
218 // Initialize the decoder. | 223 // Initialize the decoder. |
219 rectangle_decoder_->Initialize(connection_->config()); | 224 rectangle_decoder_->Initialize(connection_->config()); |
220 } | 225 } |
221 | 226 |
222 } // namespace remoting | 227 } // namespace remoting |
OLD | NEW |