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

Side by Side Diff: media/screen_capture/android/screen_capture_factory_android.cc

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 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/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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698