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

Unified Diff: android_webview/native/aw_contents.cc

Issue 256303006: Make LayerScrollOffsetDelegate updates consistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | cc/input/layer_scroll_offset_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 6e9c1fe16b0c363d009caa3515cc602bbe9b181a..91f6f9d2508bf20e004ebc2c619a4c3373bd764b 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -939,16 +939,6 @@ gfx::Point AwContents::GetLocationOnScreen() {
return gfx::Point(location[0], location[1]);
}
-void AwContents::SetMaxContainerViewScrollOffset(gfx::Vector2d new_value) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
- if (obj.is_null())
- return;
- Java_AwContents_setMaxContainerViewScrollOffset(
- env, obj.obj(), new_value.x(), new_value.y());
-}
-
void AwContents::ScrollContainerViewTo(gfx::Vector2d new_value) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
JNIEnv* env = AttachCurrentThread();
@@ -968,30 +958,25 @@ bool AwContents::IsFlingActive() const {
return Java_AwContents_isFlingActive(env, obj.obj());
}
-void AwContents::SetPageScaleFactorAndLimits(
- float page_scale_factor,
- float min_page_scale_factor,
- float max_page_scale_factor) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
- if (obj.is_null())
- return;
- Java_AwContents_setPageScaleFactorAndLimits(env,
- obj.obj(),
- page_scale_factor,
- min_page_scale_factor,
- max_page_scale_factor);
-}
-
-void AwContents::SetContentsSize(gfx::SizeF contents_size_dip) {
+void AwContents::UpdateScrollState(gfx::Vector2d max_scroll_offset,
+ gfx::SizeF contents_size_dip,
+ float page_scale_factor,
+ float min_page_scale_factor,
+ float max_page_scale_factor) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (obj.is_null())
return;
- Java_AwContents_setContentsSize(
- env, obj.obj(), contents_size_dip.width(), contents_size_dip.height());
+ Java_AwContents_updateScrollState(env,
+ obj.obj(),
+ max_scroll_offset.x(),
+ max_scroll_offset.y(),
+ contents_size_dip.width(),
+ contents_size_dip.height(),
+ page_scale_factor,
+ min_page_scale_factor,
+ max_page_scale_factor);
}
void AwContents::DidOverscroll(gfx::Vector2d overscroll_delta) {
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | cc/input/layer_scroll_offset_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698