Chromium Code Reviews| 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 204145c773647024dade3629fe31daaf9bc4fbd1..59c7dfdfcd82b4f602850f1dc91c85cb00e114d8 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, |
|
palmer
2013/04/12 18:51:21
Should this be guarded with OS_ANDROID, too?
wonsik
2013/04/15 02:44:16
This whole file is only included in Android build,
|
| + const 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); |
| @@ -1223,23 +1240,27 @@ void ContentViewCoreImpl::AttachExternalVideoSurface(JNIEnv* env, |
| jobject obj, |
| jint player_id, |
| jobject jsurface) { |
| +#if defined(GOOGLE_TV) |
| 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 |
| } |
| void ContentViewCoreImpl::DetachExternalVideoSurface(JNIEnv* env, |
| jobject obj, |
| jint player_id) { |
| +#if defined(GOOGLE_TV) |
| 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 |
| } |
| jboolean ContentViewCoreImpl::IsRenderWidgetHostViewReady(JNIEnv* env, |