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

Side by Side Diff: remoting/client/chromoting_client.cc

Issue 10382184: [Chromoting] Initial plumbing for cursor shape. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment for CaptureCursor Created 8 years, 7 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
« no previous file with comments | « no previous file | remoting/host/capturer.h » ('j') | remoting/host/capturer.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 const base::Closure& done) { 116 const base::Closure& done) {
117 DCHECK(message_loop()->BelongsToCurrentThread()); 117 DCHECK(message_loop()->BelongsToCurrentThread());
118 118
119 // If the video packet is empty then drop it. Empty packets are used to 119 // If the video packet is empty then drop it. Empty packets are used to
120 // maintain activity on the network. 120 // maintain activity on the network.
121 if (!packet->has_data() || packet->data().size() == 0) { 121 if (!packet->has_data() || packet->data().size() == 0) {
122 done.Run(); 122 done.Run();
123 return; 123 return;
124 } 124 }
125 125
126 // TODO(garykac) Add proper support for cursor shape packets.
Wez 2012/05/16 00:20:04 nit: Rather than a TODO here, just create a bug an
garykac 2012/05/22 00:42:03 Done.
127 if (packet->flags() & VideoPacket::CURSOR_SHAPE) {
128 // Ignore cursor shape changes for now.
129 done.Run();
130 return;
131 }
132
126 // Add one frame to the counter. 133 // Add one frame to the counter.
127 stats_.video_frame_rate()->Record(1); 134 stats_.video_frame_rate()->Record(1);
128 135
129 // Record other statistics received from host. 136 // Record other statistics received from host.
130 stats_.video_bandwidth()->Record(packet->data().size()); 137 stats_.video_bandwidth()->Record(packet->data().size());
131 if (packet->has_capture_time_ms()) 138 if (packet->has_capture_time_ms())
132 stats_.video_capture_ms()->Record(packet->capture_time_ms()); 139 stats_.video_capture_ms()->Record(packet->capture_time_ms());
133 if (packet->has_encode_time_ms()) 140 if (packet->has_encode_time_ms())
134 stats_.video_encode_ms()->Record(packet->encode_time_ms()); 141 stats_.video_encode_ms()->Record(packet->encode_time_ms());
135 if (packet->has_client_sequence_number() && 142 if (packet->has_client_sequence_number() &&
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 thread_proxy_.PostTask(FROM_HERE, base::Bind( 226 thread_proxy_.PostTask(FROM_HERE, base::Bind(
220 &ChromotingClient::Initialize, base::Unretained(this))); 227 &ChromotingClient::Initialize, base::Unretained(this)));
221 return; 228 return;
222 } 229 }
223 230
224 // Initialize the decoder. 231 // Initialize the decoder.
225 rectangle_decoder_->Initialize(connection_->config()); 232 rectangle_decoder_->Initialize(connection_->config());
226 } 233 }
227 234
228 } // namespace remoting 235 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/capturer.h » ('j') | remoting/host/capturer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698