| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/media/capture/screen_capture_device_android.h" | 5 #include "content/browser/media/capture/screen_capture_device_android.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "media/capture/content/android/screen_capture_machine_android.h" | 9 #include "device/capture/content/android/screen_capture_machine_android.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 ScreenCaptureDeviceAndroid::ScreenCaptureDeviceAndroid() | 13 ScreenCaptureDeviceAndroid::ScreenCaptureDeviceAndroid() |
| 14 : core_(base::WrapUnique(new media::ScreenCaptureMachineAndroid())) {} | 14 : core_(base::WrapUnique(new media::ScreenCaptureMachineAndroid())) {} |
| 15 | 15 |
| 16 ScreenCaptureDeviceAndroid::~ScreenCaptureDeviceAndroid() { | 16 ScreenCaptureDeviceAndroid::~ScreenCaptureDeviceAndroid() { |
| 17 DVLOG(2) << "ScreenCaptureDeviceAndroid@" << this << " destroying."; | 17 DVLOG(2) << "ScreenCaptureDeviceAndroid@" << this << " destroying."; |
| 18 } | 18 } |
| 19 | 19 |
| 20 void ScreenCaptureDeviceAndroid::AllocateAndStart( | 20 void ScreenCaptureDeviceAndroid::AllocateAndStart( |
| 21 const media::VideoCaptureParams& params, | 21 const media::VideoCaptureParams& params, |
| 22 std::unique_ptr<Client> client) { | 22 std::unique_ptr<Client> client) { |
| 23 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); | 23 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); |
| 24 core_.AllocateAndStart(params, std::move(client)); | 24 core_.AllocateAndStart(params, std::move(client)); |
| 25 } | 25 } |
| 26 | 26 |
| 27 void ScreenCaptureDeviceAndroid::StopAndDeAllocate() { | 27 void ScreenCaptureDeviceAndroid::StopAndDeAllocate() { |
| 28 core_.StopAndDeAllocate(); | 28 core_.StopAndDeAllocate(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void ScreenCaptureDeviceAndroid::RequestRefreshFrame() { | 31 void ScreenCaptureDeviceAndroid::RequestRefreshFrame() { |
| 32 core_.RequestRefreshFrame(); | 32 core_.RequestRefreshFrame(); |
| 33 } | 33 } |
| 34 } // namespace content | 34 } // namespace content |
| OLD | NEW |