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

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: 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 2f120b4511d01ce73d18e2b3d173c4ebffe5cb14..89a1e5ac15962e780e4db6f6dcdfe1e094f470a8 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -35,6 +35,7 @@
#include "content/common/input/web_input_event_traits.h"
#include "content/common/input_messages.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/android/external_video_surface_container.h"
#include "content/public/browser/browser_accessibility_state.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/favicon_status.h"
@@ -495,6 +496,12 @@ void ContentViewCoreImpl::UpdateFrameInfo(
controls_offset.y(),
content_offset.y(),
overdraw_bottom_height);
+#if defined(VIDEO_HOLE)
+ ExternalVideoSurfaceContainer* surface_container =
+ ExternalVideoSurfaceContainer::FromWebContents(web_contents_);
+ if (surface_container)
+ surface_container->OnFrameInfoUpdated();
+#endif // defined(VIDEO_HOLE)
}
void ContentViewCoreImpl::SetTitle(const base::string16& title) {
@@ -744,25 +751,6 @@ ScopedJavaLocalRef<jobject> ContentViewCoreImpl::CreateTouchEventSynthesizer() {
return Java_ContentViewCore_createTouchEventSynthesizer(env, obj.obj());
}
-void ContentViewCoreImpl::NotifyExternalSurface(
- int player_id, bool is_request, const gfx::RectF& rect) {
- JNIEnv* env = AttachCurrentThread();
-
- ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
- if (obj.is_null())
- return;
-
- Java_ContentViewCore_notifyExternalSurface(
- 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()),
- static_cast<jfloat>(rect.height()));
-}
-
ScopedJavaLocalRef<jobject> ContentViewCoreImpl::GetContentVideoViewClient() {
JNIEnv* env = AttachCurrentThread();
@@ -1501,33 +1489,6 @@ jboolean ContentViewCoreImpl::IsShowingInterstitialPage(JNIEnv* env,
return web_contents_->ShowingInterstitialPage();
}
-void ContentViewCoreImpl::AttachExternalVideoSurface(JNIEnv* env,
- jobject obj,
- jint player_id,
- jobject jsurface) {
-#if defined(VIDEO_HOLE)
- RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(
- web_contents_->GetRenderViewHost());
- if (rvhi && rvhi->media_player_manager()) {
- rvhi->media_player_manager()->AttachExternalVideoSurface(
- static_cast<int>(player_id), jsurface);
- }
-#endif // defined(VIDEO_HOLE)
-}
-
-void ContentViewCoreImpl::DetachExternalVideoSurface(JNIEnv* env,
- jobject obj,
- jint player_id) {
-#if defined(VIDEO_HOLE)
- RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(
- web_contents_->GetRenderViewHost());
- if (rvhi && rvhi->media_player_manager()) {
- rvhi->media_player_manager()->DetachExternalVideoSurface(
- static_cast<int>(player_id));
- }
-#endif // defined(VIDEO_HOLE)
-}
-
jboolean ContentViewCoreImpl::IsRenderWidgetHostViewReady(JNIEnv* env,
jobject obj) {
RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698