Index: content/browser/android/content_view_core_impl.cc |
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
index f84616f3bb9459da3c89a38660b3d7d69cc69ab3..ce5a70bef53f66a9e25f87542172c8c20e348a2d 100644 |
--- a/content/browser/android/content_view_core_impl.cc |
+++ b/content/browser/android/content_view_core_impl.cc |
@@ -753,19 +753,44 @@ ScopedJavaLocalRef<jobject> ContentViewCoreImpl::CreateTouchEventSynthesizer() { |
return Java_ContentViewCore_createTouchEventSynthesizer(env, obj.obj()); |
} |
-void ContentViewCoreImpl::NotifyExternalSurface( |
- int player_id, bool is_request, const gfx::RectF& rect) { |
+void ContentViewCoreImpl::RequestExternalVideoSurface(int player_id) { |
JNIEnv* env = AttachCurrentThread(); |
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
if (obj.is_null()) |
return; |
- Java_ContentViewCore_notifyExternalSurface( |
+ Java_ContentViewCore_requestExternalVideoSurface( |
+ env, |
+ obj.obj(), |
+ static_cast<jint>(player_id)); |
+} |
+ |
+void ContentViewCoreImpl::ReleaseExternalVideoSurface(int player_id) { |
+ JNIEnv* env = AttachCurrentThread(); |
+ |
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
+ if (obj.is_null()) |
+ return; |
+ |
+ Java_ContentViewCore_releaseExternalVideoSurface( |
+ env, |
+ obj.obj(), |
+ static_cast<jint>(player_id)); |
+} |
+ |
+void ContentViewCoreImpl::NotifyExternalVideoSurfacePositionChanged( |
+ int player_id, const gfx::RectF& rect) { |
+ JNIEnv* env = AttachCurrentThread(); |
+ |
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
+ if (obj.is_null()) |
+ return; |
+ |
+ Java_ContentViewCore_notifyExternalVideoSurfacePositionChanged( |
env, |
obj.obj(), |
static_cast<jint>(player_id), |
- static_cast<jboolean>(is_request), |
static_cast<jfloat>(rect.x()), |
static_cast<jfloat>(rect.y()), |
static_cast<jfloat>(rect.width()), |