Index: android_webview/native/aw_contents.cc |
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc |
index 333f8dc0313bc25e54dfef22450eba2e2223c834..d1890687fbd7f38de4655af6c1e3e9ecfe8474e9 100644 |
--- a/android_webview/native/aw_contents.cc |
+++ b/android_webview/native/aw_contents.cc |
@@ -628,19 +628,20 @@ bool AwContents::OnDraw(JNIEnv* env, |
jobject obj, |
jobject canvas, |
jboolean is_hardware_accelerated, |
- jint scroll_x, |
- jint scroll_y, |
+ jint scroll_x_pix, |
+ jint scroll_y_pix, |
jint clip_left, |
jint clip_top, |
jint clip_right, |
jint clip_bottom) { |
- return browser_view_renderer_->OnDraw(canvas, |
- is_hardware_accelerated, |
- gfx::Point(scroll_x, scroll_y), |
- gfx::Rect(clip_left, |
- clip_top, |
- clip_right - clip_left, |
- clip_bottom - clip_top)); |
+ return browser_view_renderer_->OnDraw( |
+ canvas, |
+ is_hardware_accelerated, |
+ gfx::Vector2d(scroll_x_pix, scroll_y_pix), |
+ gfx::Rect(clip_left, |
+ clip_top, |
+ clip_right - clip_left, |
+ clip_bottom - clip_top)); |
} |
void AwContents::SetPendingWebContentsForPopup( |
@@ -676,6 +677,24 @@ gfx::Point AwContents::GetLocationOnScreen() { |
return gfx::Point(location[0], location[1]); |
} |
+void AwContents::ScrollContainerViewTo(gfx::Vector2d new_value) { |
+ JNIEnv* env = AttachCurrentThread(); |
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
+ if (obj.is_null()) |
+ return; |
+ Java_AwContents_scrollContainerViewTo( |
+ env, obj.obj(), new_value.x(), new_value.y()); |
+} |
+ |
+ |
+void AwContents::SetDipScale(JNIEnv* env, jobject obj, jdouble dipScale) { |
+ browser_view_renderer_->SetDipScale(dipScale); |
+} |
+ |
+void AwContents::ScrollTo(JNIEnv* env, jobject obj, jint xPix, jint yPix) { |
+ browser_view_renderer_->ScrollTo(gfx::Vector2d(xPix, yPix)); |
+} |
+ |
void AwContents::OnPageScaleFactorChanged(float page_scale_factor) { |
JNIEnv* env = AttachCurrentThread(); |
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |