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/screen_capture/android/screen_capture_factory_android.h" |
| 6 |
| 7 #include "base/android/scoped_java_ref.h" |
| 8 #include "jni/ScreenCaptureFactory_jni.h" |
| 9 #include "media/screen_capture/android/screen_capture_device_android.h" |
| 10 |
| 11 using base::android::AttachCurrentThread; |
| 12 using base::android::ScopedJavaLocalRef; |
| 13 |
| 14 namespace media { |
| 15 |
| 16 // static |
| 17 bool ScreenCaptureFactoryAndroid::RegisterScreenCaptureFactory( |
| 18 JNIEnv* env) { |
| 19 return RegisterNativesImpl(env); |
| 20 } |
| 21 |
| 22 //static |
| 23 ScopedJavaLocalRef<jobject> |
| 24 ScreenCaptureFactoryAndroid::createScreenCaptureMachineAndroid( |
| 25 jlong nativeScreenCaptureMachineAndroid) { |
| 26 return (Java_ScreenCaptureFactory_createScreenCaptureMachine( |
| 27 AttachCurrentThread(), |
| 28 base::android::GetApplicationContext(), |
| 29 nativeScreenCaptureMachineAndroid)); |
| 30 } |
| 31 |
| 32 //static |
| 33 scoped_ptr<VideoCaptureDevice> ScreenCaptureFactoryAndroid::Create() { |
| 34 scoped_ptr<ScreenCaptureDeviceAndroid> screen_capture_device( |
| 35 new ScreenCaptureDeviceAndroid()); |
| 36 |
| 37 return screen_capture_device.Pass(); |
| 38 } |
| 39 |
| 40 } // namespace media |
OLD | NEW |