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..e0b5d161394427c8fe3a5b6c250bed470b6609b4 |
--- /dev/null |
+++ b/media/base/android/java/src/org/chromium/media/ScreenCaptureFactory.java |
@@ -0,0 +1,31 @@ |
+// 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 { |
+ |
+ private static final String TAG = "ScreenCaptureAndroid"; |
+ |
+ private static boolean isLReleaseOrLater() { |
+ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; |
miu
2015/05/20 03:33:27
nit: This expression doesn't need its own method.
|
+ } |
+ |
+ // Factory methods. |
+ @CalledByNative |
+ static ScreenCapture createScreenCapture(Context context, long nativeScreenCapturerAndroid) { |
+ if (isLReleaseOrLater()) { |
+ return new ScreenCapture(context, nativeScreenCapturerAndroid); |
+ } |
+ return null; |
+ } |
+} |