| Index: media/capture/content/android/screen_capture_factory_android.cc
|
| diff --git a/media/capture/content/android/screen_capture_factory_android.cc b/media/capture/content/android/screen_capture_factory_android.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5e74dc7d2d990ee03f1997d77528cacb7fef07ac
|
| --- /dev/null
|
| +++ b/media/capture/content/android/screen_capture_factory_android.cc
|
| @@ -0,0 +1,39 @@
|
| +// 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/capture/content/android/screen_capture_factory_android.h"
|
| +
|
| +#include "base/android/context_utils.h"
|
| +#include "base/android/scoped_java_ref.h"
|
| +#include "jni/ScreenCaptureFactory_jni.h"
|
| +#include "media/capture/content/android/screen_capture_device_android.h"
|
| +
|
| +using base::android::AttachCurrentThread;
|
| +using base::android::ScopedJavaLocalRef;
|
| +
|
| +namespace media {
|
| +
|
| +// static
|
| +bool ScreenCaptureFactoryAndroid::RegisterScreenCaptureFactory(JNIEnv* env) {
|
| + return RegisterNativesImpl(env);
|
| +}
|
| +
|
| +// static
|
| +ScopedJavaLocalRef<jobject>
|
| +ScreenCaptureFactoryAndroid::createScreenCaptureMachineAndroid(
|
| + jlong nativeScreenCaptureMachineAndroid) {
|
| + return (Java_ScreenCaptureFactory_createScreenCaptureMachine(
|
| + AttachCurrentThread(), base::android::GetApplicationContext(),
|
| + nativeScreenCaptureMachineAndroid));
|
| +}
|
| +
|
| +// static
|
| +std::unique_ptr<VideoCaptureDevice> ScreenCaptureFactoryAndroid::Create() {
|
| + std::unique_ptr<ScreenCaptureDeviceAndroid> screen_capture_device(
|
| + new ScreenCaptureDeviceAndroid());
|
| +
|
| + return std::move(screen_capture_device);
|
| +}
|
| +
|
| +} // namespace media
|
|
|