OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "android_webview/native/external_video_surface_container_impl.h" | 5 #include "android_webview/native/external_video_surface_container_impl.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "content/public/browser/android/content_view_core.h" | 8 #include "content/public/browser/android/content_view_core.h" |
9 #include "jni/ExternalVideoSurfaceContainer_jni.h" | 9 #include "jni/ExternalVideoSurfaceContainer_jni.h" |
10 #include "ui/gfx/rect_f.h" | 10 #include "ui/gfx/geometry/rect_f.h" |
11 | 11 |
12 using base::android::AttachCurrentThread; | 12 using base::android::AttachCurrentThread; |
13 using content::ContentViewCore; | 13 using content::ContentViewCore; |
14 | 14 |
15 namespace android_webview { | 15 namespace android_webview { |
16 | 16 |
17 ExternalVideoSurfaceContainerImpl::ExternalVideoSurfaceContainerImpl( | 17 ExternalVideoSurfaceContainerImpl::ExternalVideoSurfaceContainerImpl( |
18 content::WebContents* web_contents) { | 18 content::WebContents* web_contents) { |
19 ContentViewCore* cvc = ContentViewCore::FromWebContents(web_contents); | 19 ContentViewCore* cvc = ContentViewCore::FromWebContents(web_contents); |
20 if (cvc) { | 20 if (cvc) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 JNIEnv* env, jobject obj, jint player_id) { | 82 JNIEnv* env, jobject obj, jint player_id) { |
83 if (!surface_destroyed_cb_.is_null()) | 83 if (!surface_destroyed_cb_.is_null()) |
84 surface_destroyed_cb_.Run(static_cast<int>(player_id)); | 84 surface_destroyed_cb_.Run(static_cast<int>(player_id)); |
85 } | 85 } |
86 | 86 |
87 bool RegisterExternalVideoSurfaceContainer(JNIEnv* env) { | 87 bool RegisterExternalVideoSurfaceContainer(JNIEnv* env) { |
88 return RegisterNativesImpl(env); | 88 return RegisterNativesImpl(env); |
89 } | 89 } |
90 | 90 |
91 } // namespace android_webview | 91 } // namespace android_webview |
OLD | NEW |