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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 210213002: [android_webview] Update max scroll offset from page scale change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « android_webview/browser/browser_view_renderer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.content.ComponentCallbacks2; 9 import android.content.ComponentCallbacks2;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 if (mPageScaleFactor == pageScaleFactor && 1970 if (mPageScaleFactor == pageScaleFactor &&
1971 mMinPageScaleFactor == minPageScaleFactor && 1971 mMinPageScaleFactor == minPageScaleFactor &&
1972 mMaxPageScaleFactor == maxPageScaleFactor) { 1972 mMaxPageScaleFactor == maxPageScaleFactor) {
1973 return; 1973 return;
1974 } 1974 }
1975 mMinPageScaleFactor = minPageScaleFactor; 1975 mMinPageScaleFactor = minPageScaleFactor;
1976 mMaxPageScaleFactor = maxPageScaleFactor; 1976 mMaxPageScaleFactor = maxPageScaleFactor;
1977 if (mPageScaleFactor != pageScaleFactor) { 1977 if (mPageScaleFactor != pageScaleFactor) {
1978 float oldPageScaleFactor = mPageScaleFactor; 1978 float oldPageScaleFactor = mPageScaleFactor;
1979 mPageScaleFactor = pageScaleFactor; 1979 mPageScaleFactor = pageScaleFactor;
1980 // NOTE: if this ever needs to become synchronous then we need to make sure the scroll
1981 // bounds are correctly updated before calling the method, otherwise e mbedder code that
1982 // attempts to scroll on scale change might cause weird results.
1980 mContentsClient.getCallbackHelper().postOnScaleChangedScaled( 1983 mContentsClient.getCallbackHelper().postOnScaleChangedScaled(
1981 (float)(oldPageScaleFactor * mDIPScale), 1984 (float)(oldPageScaleFactor * mDIPScale),
1982 (float)(mPageScaleFactor * mDIPScale)); 1985 (float)(mPageScaleFactor * mDIPScale));
1983 } 1986 }
1984 } 1987 }
1985 1988
1986 @CalledByNative 1989 @CalledByNative
1987 private void setAwAutofillManagerDelegate(AwAutofillManagerDelegate delegate ) { 1990 private void setAwAutofillManagerDelegate(AwAutofillManagerDelegate delegate ) {
1988 mAwAutofillManagerDelegate = delegate; 1991 mAwAutofillManagerDelegate = delegate;
1989 delegate.init(mContentViewCore); 1992 delegate.init(mContentViewCore);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2131 long nativeAwContents, boolean value, String requestingFrame); 2134 long nativeAwContents, boolean value, String requestingFrame);
2132 2135
2133 private native void nativeSetJsOnlineProperty(long nativeAwContents, boolean networkUp); 2136 private native void nativeSetJsOnlineProperty(long nativeAwContents, boolean networkUp);
2134 2137
2135 private native void nativeTrimMemoryOnRenderThread(long nativeAwContents, in t level, 2138 private native void nativeTrimMemoryOnRenderThread(long nativeAwContents, in t level,
2136 boolean visible); 2139 boolean visible);
2137 2140
2138 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo rter awPdfExporter); 2141 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo rter awPdfExporter);
2139 2142
2140 } 2143 }
OLDNEW
« no previous file with comments | « android_webview/browser/browser_view_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698