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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 132233042: Enable the embedded L1/EME support in WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added ExternalVideoSurfaceDelegate.java. Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
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 c0e7d0adbc60e1f23719b9fc8fe74470880d49b6..99460699123633b2bfd107cfc1be7814ba5284ae 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -743,19 +743,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()),

Powered by Google App Engine
This is Rietveld 408576698