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

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

Issue 13688004: Location/size change notification when external rendering is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Put notification hook under ifdef's to minimize performance implication on other platforms 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 ccdc2e0271bb7dd8da93ee8210f0d3351ad4268b..7f97ce6dc7e6469fcf320f98ac3775c122ddeafa 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -602,6 +602,23 @@ void ContentViewCoreImpl::RequestExternalVideoSurface(int player_id) {
env, obj.obj(), static_cast<jint>(player_id));
}
+void ContentViewCoreImpl::NotifyGeometryChange(int player_id,
+ gfx::RectF& rect) {
+ JNIEnv* env = AttachCurrentThread();
+
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
+ if (obj.is_null())
+ return;
+
+ Java_ContentViewCore_notifyGeometryChange(env,
+ obj.obj(),
+ static_cast<jint>(player_id),
+ static_cast<jfloat>(rect.x()),
+ static_cast<jfloat>(rect.y()),
+ static_cast<jfloat>(rect.width()),
+ static_cast<jfloat>(rect.height()));
+}
+
gfx::Size ContentViewCoreImpl::GetPhysicalBackingSize() const {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env);

Powered by Google App Engine
This is Rietveld 408576698