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

Side by Side Diff: media/capture/content/android/screen_capture_factory_android.cc

Issue 1917023003: ScreenCapture for Android phase1, part I (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(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/capture/content/android/screen_capture_factory_android.h"
6
7 #include "base/android/context_utils.h"
8 #include "base/android/scoped_java_ref.h"
9 #include "jni/ScreenCaptureFactory_jni.h"
10 #include "media/capture/content/android/screen_capture_device_android.h"
11
12 using base::android::AttachCurrentThread;
13 using base::android::ScopedJavaLocalRef;
14
15 namespace media {
16
17 // static
18 bool ScreenCaptureFactoryAndroid::RegisterScreenCaptureFactory(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(), base::android::GetApplicationContext(),
28 nativeScreenCaptureMachineAndroid));
29 }
30
31 // static
32 std::unique_ptr<VideoCaptureDevice> ScreenCaptureFactoryAndroid::Create() {
33 std::unique_ptr<ScreenCaptureDeviceAndroid> screen_capture_device(
34 new ScreenCaptureDeviceAndroid());
35
36 return std::move(screen_capture_device);
37 }
38
39 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698