Chromium Code Reviews| Index: media/capture/content/android/screen_capture_device_android.cc |
| diff --git a/media/capture/content/android/screen_capture_device_android.cc b/media/capture/content/android/screen_capture_device_android.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cc122b05e251e5c59327d76b53ea5e6f0ae4edc8 |
| --- /dev/null |
| +++ b/media/capture/content/android/screen_capture_device_android.cc |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "media/capture/content/android/screen_capture_device_android.h" |
| + |
| +#include "base/logging.h" |
| +#include "base/memory/ptr_util.h" |
| +#include "media/capture/content/android/screen_capture_machine_android.h" |
| + |
| +namespace media { |
| + |
| +ScreenCaptureDeviceAndroid::ScreenCaptureDeviceAndroid() { |
| + ScreenCaptureMachineAndroid* machine = new ScreenCaptureMachineAndroid(); |
| + core_.reset(new ScreenCaptureDeviceCore(base::WrapUnique(machine))); |
|
mcasas
2016/04/27 01:19:27
Make |core_| const and initialize it in the
initia
braveyao
2016/05/04 18:49:41
Done.
Anyway I think it's also good to stay in sam
|
| +} |
| + |
| +ScreenCaptureDeviceAndroid::~ScreenCaptureDeviceAndroid() { |
| + DVLOG(2) << "ScreenCaptureDeviceAndroid@" << this << " destroying."; |
| +} |
| + |
| +void ScreenCaptureDeviceAndroid::AllocateAndStart( |
| + const media::VideoCaptureParams& params, |
| + std::unique_ptr<Client> client) { |
| + DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); |
| + core_->AllocateAndStart(params, std::move(client)); |
| +} |
| + |
| +void ScreenCaptureDeviceAndroid::StopAndDeAllocate() { |
| + core_->StopAndDeAllocate(); |
|
mcasas
2016/04/27 01:19:27
ScreenCaptureDeviceAndroid is just a forwarder
cla
braveyao
2016/05/04 18:49:41
Done. Move it to Content as a front, also for the
|
| +} |
| + |
| +} // namespace media |