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, |
| + const gfx::RectF& rect) { |
| + JNIEnv* env = AttachCurrentThread(); |
|
Yaron
2013/04/17 17:30:00
Can we guard this too for GOOGLE_TV?
wonsik
2013/04/18 05:13:21
Guarding it causes build failure for non-GoogleTV
scherkus (not reviewing)
2013/04/18 17:55:21
Hmm... and there's no way to only generate the Jav
Yaron
2013/04/18 18:13:52
Ahh, right. Otherwise Java_ContentViewCore_notifyG
|
| + |
| + 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) |
|
scherkus (not reviewing)
2013/04/17 18:12:41
if we #ifdef out the declarations in the .h these
wonsik
2013/04/18 05:13:21
Please see my comment in the .h file.
|
| 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, |