Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(798)

Unified Diff: media/base/android/java/src/org/chromium/media/ScreenCaptureFactory.java

Issue 1140113002: Implement screen capture for android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ScreenCaptureMachineAndroid which inherited from content::VideoCaptureMachine Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/android/java/src/org/chromium/media/ScreenCaptureFactory.java
diff --git a/media/base/android/java/src/org/chromium/media/ScreenCaptureFactory.java b/media/base/android/java/src/org/chromium/media/ScreenCaptureFactory.java
new file mode 100644
index 0000000000000000000000000000000000000000..c1b43df1be83955545af21ddc435ac4b2390de7c
--- /dev/null
+++ b/media/base/android/java/src/org/chromium/media/ScreenCaptureFactory.java
@@ -0,0 +1,26 @@
+// 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.
+
+package org.chromium.media;
+
+import android.content.Context;
+import android.os.Build;
+
+import org.chromium.base.CalledByNative;
+import org.chromium.base.JNINamespace;
+
+@JNINamespace("media")
+@SuppressWarnings("deprecation")
+class ScreenCaptureFactory {
+
+ // Factory methods.
+ @CalledByNative
+ static ScreenCapture createScreenCaptureMachine(Context context,
+ long nativeScreenCaptureMachineAndroid) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ return new ScreenCapture(context, nativeScreenCaptureMachineAndroid);
+ }
+ return null;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698