| 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 "components/external_video_surface/browser/android/external_video_surfa
ce_container_impl.h" | 5 #include "components/external_video_surface/browser/android/external_video_surfa
ce_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/geometry/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 base::android::JavaParamRef; |
| 13 using content::ContentViewCore; | 14 using content::ContentViewCore; |
| 14 | 15 |
| 15 namespace external_video_surface { | 16 namespace external_video_surface { |
| 16 | 17 |
| 17 // static | 18 // static |
| 18 bool ExternalVideoSurfaceContainerImpl::RegisterJni(JNIEnv* env) { | 19 bool ExternalVideoSurfaceContainerImpl::RegisterJni(JNIEnv* env) { |
| 19 return RegisterNativesImpl(env); | 20 return RegisterNativesImpl(env); |
| 20 } | 21 } |
| 21 | 22 |
| 22 // static | 23 // static |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 110 |
| 110 void ExternalVideoSurfaceContainerImpl::SurfaceDestroyed( | 111 void ExternalVideoSurfaceContainerImpl::SurfaceDestroyed( |
| 111 JNIEnv* env, | 112 JNIEnv* env, |
| 112 const JavaParamRef<jobject>& obj, | 113 const JavaParamRef<jobject>& obj, |
| 113 jint player_id) { | 114 jint player_id) { |
| 114 if (!surface_destroyed_cb_.is_null()) | 115 if (!surface_destroyed_cb_.is_null()) |
| 115 surface_destroyed_cb_.Run(static_cast<int>(player_id)); | 116 surface_destroyed_cb_.Run(static_cast<int>(player_id)); |
| 116 } | 117 } |
| 117 | 118 |
| 118 } // namespace external_video_surface | 119 } // namespace external_video_surface |
| OLD | NEW |