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 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 | 2047 |
2048 @CalledByNative | 2048 @CalledByNative |
2049 private void postInvalidateOnAnimation() { | 2049 private void postInvalidateOnAnimation() { |
2050 if (SUPPORTS_ON_ANIMATION && !mWindowAndroid.isInsideVSync()) { | 2050 if (SUPPORTS_ON_ANIMATION && !mWindowAndroid.isInsideVSync()) { |
2051 mContainerView.postInvalidateOnAnimation(); | 2051 mContainerView.postInvalidateOnAnimation(); |
2052 } else { | 2052 } else { |
2053 mContainerView.invalidate(); | 2053 mContainerView.invalidate(); |
2054 } | 2054 } |
2055 } | 2055 } |
2056 | 2056 |
| 2057 // Call postInvalidateOnAnimation for invalidations. This is only used to sy
nchronize |
| 2058 // draw functor destruction. |
| 2059 @CalledByNative |
| 2060 private void invalidateOnFunctorDestroy() { |
| 2061 mContainerView.invalidate(); |
| 2062 } |
| 2063 |
2057 @CalledByNative | 2064 @CalledByNative |
2058 private int[] getLocationOnScreen() { | 2065 private int[] getLocationOnScreen() { |
2059 int[] result = new int[2]; | 2066 int[] result = new int[2]; |
2060 mContainerView.getLocationOnScreen(result); | 2067 mContainerView.getLocationOnScreen(result); |
2061 return result; | 2068 return result; |
2062 } | 2069 } |
2063 | 2070 |
2064 @CalledByNative | 2071 @CalledByNative |
2065 private void onWebLayoutPageScaleFactorChanged(float webLayoutPageScaleFacto
r) { | 2072 private void onWebLayoutPageScaleFactorChanged(float webLayoutPageScaleFacto
r) { |
2066 // This change notification comes from the renderer thread, not from the
cc/ impl thread. | 2073 // This change notification comes from the renderer thread, not from the
cc/ impl thread. |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2502 | 2509 |
2503 private native void nativeSetJsOnlineProperty(long nativeAwContents, boolean
networkUp); | 2510 private native void nativeSetJsOnlineProperty(long nativeAwContents, boolean
networkUp); |
2504 | 2511 |
2505 private native void nativeTrimMemory(long nativeAwContents, int level, boole
an visible); | 2512 private native void nativeTrimMemory(long nativeAwContents, int level, boole
an visible); |
2506 | 2513 |
2507 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo
rter awPdfExporter); | 2514 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo
rter awPdfExporter); |
2508 | 2515 |
2509 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, | 2516 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, |
2510 long resources); | 2517 long resources); |
2511 } | 2518 } |
OLD | NEW |