| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/renderer_host/media/desktop_capture_device.h" | 5 #include "content/browser/renderer_host/media/desktop_capture_device.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 363 |
| 364 scoped_ptr<webrtc::DesktopCapturer> capturer; | 364 scoped_ptr<webrtc::DesktopCapturer> capturer; |
| 365 | 365 |
| 366 switch (source.type) { | 366 switch (source.type) { |
| 367 case DesktopMediaID::TYPE_SCREEN: { | 367 case DesktopMediaID::TYPE_SCREEN: { |
| 368 scoped_ptr<webrtc::DesktopCapturer> screen_capturer; | 368 scoped_ptr<webrtc::DesktopCapturer> screen_capturer; |
| 369 screen_capturer.reset(webrtc::ScreenCapturer::Create(options)); | 369 screen_capturer.reset(webrtc::ScreenCapturer::Create(options)); |
| 370 if (screen_capturer) { | 370 if (screen_capturer) { |
| 371 capturer.reset(new webrtc::DesktopAndCursorComposer( | 371 capturer.reset(new webrtc::DesktopAndCursorComposer( |
| 372 screen_capturer.release(), | 372 screen_capturer.release(), |
| 373 webrtc::MouseCursorMonitor::CreateForScreen(options))); | 373 webrtc::MouseCursorMonitor::CreateForScreen( |
| 374 options, webrtc::kFullDesktopScreenId))); |
| 374 } | 375 } |
| 375 break; | 376 break; |
| 376 } | 377 } |
| 377 | 378 |
| 378 case DesktopMediaID::TYPE_WINDOW: { | 379 case DesktopMediaID::TYPE_WINDOW: { |
| 379 scoped_ptr<webrtc::WindowCapturer> window_capturer( | 380 scoped_ptr<webrtc::WindowCapturer> window_capturer( |
| 380 webrtc::WindowCapturer::Create(options)); | 381 webrtc::WindowCapturer::Create(options)); |
| 381 if (window_capturer && window_capturer->SelectWindow(source.id)) { | 382 if (window_capturer && window_capturer->SelectWindow(source.id)) { |
| 382 capturer.reset(new webrtc::DesktopAndCursorComposer( | 383 capturer.reset(new webrtc::DesktopAndCursorComposer( |
| 383 window_capturer.release(), | 384 window_capturer.release(), |
| (...skipping 27 matching lines...) Expand all Loading... |
| 411 const media::VideoCaptureParams& params, | 412 const media::VideoCaptureParams& params, |
| 412 scoped_ptr<Client> client) { | 413 scoped_ptr<Client> client) { |
| 413 core_->AllocateAndStart(params, client.Pass()); | 414 core_->AllocateAndStart(params, client.Pass()); |
| 414 } | 415 } |
| 415 | 416 |
| 416 void DesktopCaptureDevice::StopAndDeAllocate() { | 417 void DesktopCaptureDevice::StopAndDeAllocate() { |
| 417 core_->StopAndDeAllocate(); | 418 core_->StopAndDeAllocate(); |
| 418 } | 419 } |
| 419 | 420 |
| 420 } // namespace content | 421 } // namespace content |
| OLD | NEW |