Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "media/capture/content/android/screen_capture_device_android.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 #include "base/memory/ptr_util.h" | |
| 9 #include "media/capture/content/android/screen_capture_machine_android.h" | |
| 10 | |
| 11 namespace media { | |
| 12 | |
| 13 ScreenCaptureDeviceAndroid::ScreenCaptureDeviceAndroid() { | |
| 14 ScreenCaptureMachineAndroid* machine = new ScreenCaptureMachineAndroid(); | |
| 15 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
| |
| 16 } | |
| 17 | |
| 18 ScreenCaptureDeviceAndroid::~ScreenCaptureDeviceAndroid() { | |
| 19 DVLOG(2) << "ScreenCaptureDeviceAndroid@" << this << " destroying."; | |
| 20 } | |
| 21 | |
| 22 void ScreenCaptureDeviceAndroid::AllocateAndStart( | |
| 23 const media::VideoCaptureParams& params, | |
| 24 std::unique_ptr<Client> client) { | |
| 25 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); | |
| 26 core_->AllocateAndStart(params, std::move(client)); | |
| 27 } | |
| 28 | |
| 29 void ScreenCaptureDeviceAndroid::StopAndDeAllocate() { | |
| 30 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
| |
| 31 } | |
| 32 | |
| 33 } // namespace media | |
| OLD | NEW |