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 be5f845e5dd450b807dea9528f2e262cbe0789d4..4b709c6787f37a1108278e9e85d76f55e139368c 100644 |
| --- a/content/browser/android/content_view_core_impl.cc |
| +++ b/content/browser/android/content_view_core_impl.cc |
| @@ -15,6 +15,7 @@ |
| #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" |
| +#include "content/browser/renderer_host/compositor_impl_android.h" |
| #include "content/browser/renderer_host/render_view_host_impl.h" |
| #include "content/browser/renderer_host/render_widget_host_impl.h" |
| #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| @@ -443,6 +444,18 @@ void ContentViewCoreImpl::ShowPastePopup(int x, int y) { |
| static_cast<jint>(y)); |
| } |
| +unsigned int ContentViewCoreImpl::GetScaledContentTexture( |
| + const gfx::Size& size) { |
| + if (!CompositorImpl::IsInitialized()) |
|
no sievers
2012/10/20 00:42:36
Can you move this check to RWHVA? Same below.
David Trainor- moved to gerrit
2012/10/22 17:56:16
Done.
|
| + return 0; |
| + |
| + RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
| + if (!view) |
| + return 0; |
| + |
| + return view->GetScaledContentTexture(size); |
| +} |
| + |
| void ContentViewCoreImpl::StartContentIntent(const GURL& content_url) { |
| JNIEnv* env = AttachCurrentThread(); |
| ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env); |
| @@ -877,6 +890,19 @@ void ContentViewCoreImpl::UpdateVSyncParameters(JNIEnv* env, jobject /* obj */, |
| base::TimeDelta::FromMicroseconds(interval_micros)); |
| } |
| +jboolean ContentViewCoreImpl::PopulateBitmapFromCompositor(JNIEnv* env, |
| + jobject obj, |
| + jobject jbitmap) { |
| + if (!CompositorImpl::IsInitialized()) |
| + return false; |
| + |
| + RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
| + if (!view) |
| + return false; |
| + |
| + return view->PopulateBitmapWithContents(jbitmap); |
| +} |
| + |
| void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env, |
| jobject obj) { |
| RenderViewHost* host = web_contents_->GetRenderViewHost(); |