OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |