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

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: Addressed boliu's comments and rebased. 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 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()),

Powered by Google App Engine
This is Rietveld 408576698