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

Side by Side Diff: remoting/host/client_session.cc

Issue 2431513003: Revert of Don't use barcodes in ProtocolPerfTests (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/test/cyclic_frame_generator.h » ('j') | no next file with comments »
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/host/client_session.h" 5 #include "remoting/host/client_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 288 }
289 289
290 video_stream_->SetObserver(this); 290 video_stream_->SetObserver(this);
291 291
292 // Apply video-control parameters to the new stream. 292 // Apply video-control parameters to the new stream.
293 video_stream_->SetLosslessEncode(lossless_video_encode_); 293 video_stream_->SetLosslessEncode(lossless_video_encode_);
294 video_stream_->SetLosslessColor(lossless_video_color_); 294 video_stream_->SetLosslessColor(lossless_video_color_);
295 295
296 // Pause capturing if necessary. 296 // Pause capturing if necessary.
297 video_stream_->Pause(pause_video_); 297 video_stream_->Pause(pause_video_);
298
299 if (event_timestamp_source_for_tests_)
300 video_stream_->SetEventTimestampsSource(event_timestamp_source_for_tests_);
301 } 298 }
302 299
303 void ClientSession::OnConnectionChannelsConnected() { 300 void ClientSession::OnConnectionChannelsConnected() {
304 DCHECK(CalledOnValidThread()); 301 DCHECK(CalledOnValidThread());
305 302
306 DCHECK(!channels_connected_); 303 DCHECK(!channels_connected_);
307 channels_connected_ = true; 304 channels_connected_ = true;
308 305
309 // Negotiate capabilities with the client. 306 // Negotiate capabilities with the client.
310 VLOG(1) << "Host capabilities: " << host_capabilities_; 307 VLOG(1) << "Host capabilities: " << host_capabilities_;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 DCHECK(CalledOnValidThread()); 397 DCHECK(CalledOnValidThread());
401 DCHECK(desktop_environment_); 398 DCHECK(desktop_environment_);
402 return desktop_environment_->GetDesktopSessionId(); 399 return desktop_environment_->GetDesktopSessionId();
403 } 400 }
404 401
405 ClientSessionControl* ClientSession::session_control() { 402 ClientSessionControl* ClientSession::session_control() {
406 DCHECK(CalledOnValidThread()); 403 DCHECK(CalledOnValidThread());
407 return this; 404 return this;
408 } 405 }
409 406
410 void ClientSession::SetEventTimestampsSourceForTests(
411 scoped_refptr<protocol::InputEventTimestampsSource>
412 event_timestamp_source) {
413 DCHECK(CalledOnValidThread());
414 event_timestamp_source_for_tests_ = event_timestamp_source;
415 if (video_stream_)
416 video_stream_->SetEventTimestampsSource(event_timestamp_source_for_tests_);
417 }
418
419 std::unique_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() { 407 std::unique_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() {
420 DCHECK(CalledOnValidThread()); 408 DCHECK(CalledOnValidThread());
409
421 return base::MakeUnique<protocol::ClipboardThreadProxy>( 410 return base::MakeUnique<protocol::ClipboardThreadProxy>(
422 client_clipboard_factory_.GetWeakPtr(), 411 client_clipboard_factory_.GetWeakPtr(),
423 base::ThreadTaskRunnerHandle::Get()); 412 base::ThreadTaskRunnerHandle::Get());
424 } 413 }
425 414
426 void ClientSession::OnVideoSizeChanged(protocol::VideoStream* video_stream, 415 void ClientSession::OnVideoSizeChanged(protocol::VideoStream* video_stream,
427 const webrtc::DesktopSize& size, 416 const webrtc::DesktopSize& size,
428 const webrtc::DesktopVector& dpi) { 417 const webrtc::DesktopVector& dpi) {
429 DCHECK(CalledOnValidThread()); 418 DCHECK(CalledOnValidThread());
430 419
(...skipping 29 matching lines...) Expand all
460 connection_->client_stub()->SetVideoLayout(layout); 449 connection_->client_stub()->SetVideoLayout(layout);
461 } else { 450 } else {
462 pending_video_layout_message_.reset(new protocol::VideoLayout(layout)); 451 pending_video_layout_message_.reset(new protocol::VideoLayout(layout));
463 } 452 }
464 break; 453 break;
465 } 454 }
466 } 455 }
467 } 456 }
468 457
469 } // namespace remoting 458 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/test/cyclic_frame_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698