Index: content/browser/media/capture/screen_capture_device_android.cc |
diff --git a/content/browser/media/capture/screen_capture_device_android.cc b/content/browser/media/capture/screen_capture_device_android.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..077542e4b252a3f6cd8e404a827cc3d15aa68546 |
--- /dev/null |
+++ b/content/browser/media/capture/screen_capture_device_android.cc |
@@ -0,0 +1,34 @@ |
+// Copyright 2016 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 "content/browser/media/capture/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 content { |
+ |
+ScreenCaptureDeviceAndroid::ScreenCaptureDeviceAndroid() |
+ : core_(base::WrapUnique(new media::ScreenCaptureMachineAndroid())) {} |
+ |
+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(); |
+} |
+ |
+void ScreenCaptureDeviceAndroid::RequestRefreshFrame() { |
+ core_.RequestRefreshFrame(); |
+} |
+} // namespace content |