Index: media/screen_capture/android/screen_capture_device_android.cc |
diff --git a/media/screen_capture/android/screen_capture_device_android.cc b/media/screen_capture/android/screen_capture_device_android.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1f7d74fe084d048fb530e2424a041f36d67a442a |
--- /dev/null |
+++ b/media/screen_capture/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/screen_capture/android/screen_capture_device_android.h" |
+ |
+#include "base/logging.h" |
+#include "media/screen_capture/android/screen_capture_machine_android.h" |
+ |
+namespace media { |
+ |
+ScreenCaptureDeviceAndroid::ScreenCaptureDeviceAndroid() { |
+ ScreenCaptureMachineAndroid* machine = new ScreenCaptureMachineAndroid(); |
+ core_.reset( |
+ new content::ContentVideoCaptureDeviceCore(make_scoped_ptr(machine))); |
+} |
+ |
+ScreenCaptureDeviceAndroid::~ScreenCaptureDeviceAndroid() { |
+ DVLOG(2) << "ScreenCaptureDeviceAndroid@" << this << " destroying."; |
+} |
+ |
+void ScreenCaptureDeviceAndroid::AllocateAndStart( |
+ const media::VideoCaptureParams& params, |
+ scoped_ptr<Client> client) { |
+ DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); |
+ core_->AllocateAndStart(params, client.Pass()); |
+} |
+ |
+void ScreenCaptureDeviceAndroid::StopAndDeAllocate() { |
+ core_->StopAndDeAllocate(); |
+} |
+ |
+} // namespace content |