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

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

Issue 12443003: Implement out-of-band video compositing on Android: Step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 7 years, 9 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 0ae2b94817c176e406c693a291eb75f037e3e208..ed6a1533f91e2f017b99458848ce9657d9ea712b 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -16,6 +16,7 @@
#include "cc/layer.h"
#include "content/browser/android/interstitial_page_delegate_android.h"
#include "content/browser/android/load_url_params.h"
+#include "content/browser/android/media_player_manager_android.h"
#include "content/browser/android/touch_point.h"
#include "content/browser/renderer_host/java/java_bound_object.h"
#include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h"
@@ -1198,6 +1199,25 @@ void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) {
host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID()));
}
+void ContentViewCoreImpl::ExternalVideoSurfaceCreated(JNIEnv* env,
+ jobject obj,
+ jobject jsurface) {
+ RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(
+ web_contents_->GetRenderViewHost());
+ DCHECK(rvhi);
scherkus (not reviewing) 2013/03/07 00:09:13 DCHECKs aren't useful when you immediately derefer
wonsik 2013/03/07 02:54:08 Removed & added the condition in if clause.
+ if (rvhi->media_player_manager())
+ rvhi->media_player_manager()->SetExternalVideoSurface(jsurface);
+}
+
+void ContentViewCoreImpl::ExternalVideoSurfaceDestroyed(JNIEnv* env,
+ jobject obj) {
+ RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(
+ web_contents_->GetRenderViewHost());
+ DCHECK(rvhi);
scherkus (not reviewing) 2013/03/07 00:09:13 ditto
wonsik 2013/03/07 02:54:08 Removed & added the condition in if clause.
+ if (rvhi->media_player_manager())
+ rvhi->media_player_manager()->SetExternalVideoSurface(NULL);
+}
+
void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env,
jobject obj) {
RenderViewHost* host = web_contents_->GetRenderViewHost();

Powered by Google App Engine
This is Rietveld 408576698