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

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

Issue 398873005: Preparations for Cast Host Extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary getter methods Created 6 years, 4 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
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 8
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "remoting/base/capabilities.h" 10 #include "remoting/base/capabilities.h"
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 scoped_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() { 475 scoped_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() {
476 DCHECK(CalledOnValidThread()); 476 DCHECK(CalledOnValidThread());
477 477
478 return scoped_ptr<protocol::ClipboardStub>( 478 return scoped_ptr<protocol::ClipboardStub>(
479 new protocol::ClipboardThreadProxy( 479 new protocol::ClipboardThreadProxy(
480 client_clipboard_factory_.GetWeakPtr(), 480 client_clipboard_factory_.GetWeakPtr(),
481 base::MessageLoopProxy::current())); 481 base::MessageLoopProxy::current()));
482 } 482 }
483 483
484 scoped_ptr<webrtc::ScreenCapturer> ClientSession::RequestScreenCapturer() {
Sergey Ulanov 2014/07/29 06:59:18 After our discussion with Wez today, I don't think
aiguha 2014/07/29 17:06:26 Agreed.
485 // VideoScheduler must be stopped on one of these threads.
486 DCHECK(video_capture_task_runner_->BelongsToCurrentThread() ||
487 network_task_runner_->BelongsToCurrentThread());
488
489 if (!video_scheduler_.get()) {
490 LOG(ERROR) << "Video Scheduler was NULL, but shouldn't have been.";
491 return scoped_ptr<webrtc::ScreenCapturer>();
492 }
493
494 video_scheduler_->Stop();
495
496 return desktop_environment_->CreateVideoCapturer();
497 }
498
484 // TODO(sergeyu): Move this to SessionManager? 499 // TODO(sergeyu): Move this to SessionManager?
485 // static 500 // static
486 scoped_ptr<VideoEncoder> ClientSession::CreateVideoEncoder( 501 scoped_ptr<VideoEncoder> ClientSession::CreateVideoEncoder(
487 const protocol::SessionConfig& config) { 502 const protocol::SessionConfig& config) {
488 const protocol::ChannelConfig& video_config = config.video_config(); 503 const protocol::ChannelConfig& video_config = config.video_config();
489 504
490 if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) { 505 if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) {
491 return remoting::VideoEncoderVpx::CreateForVP8().PassAs<VideoEncoder>(); 506 return remoting::VideoEncoderVpx::CreateForVP8().PassAs<VideoEncoder>();
492 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VP9) { 507 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VP9) {
493 return remoting::VideoEncoderVpx::CreateForVP9().PassAs<VideoEncoder>(); 508 return remoting::VideoEncoderVpx::CreateForVP9().PassAs<VideoEncoder>();
(...skipping 12 matching lines...) Expand all
506 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); 521 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim());
507 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { 522 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) {
508 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); 523 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus());
509 } 524 }
510 525
511 NOTREACHED(); 526 NOTREACHED();
512 return scoped_ptr<AudioEncoder>(); 527 return scoped_ptr<AudioEncoder>();
513 } 528 }
514 529
515 } // namespace remoting 530 } // namespace remoting
OLDNEW
« remoting/host/client_session.h ('K') | « remoting/host/client_session.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698