OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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.content.res.Configuration; | 7 import android.content.res.Configuration; |
8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
9 import android.graphics.Canvas; | 9 import android.graphics.Canvas; |
10 import android.graphics.Color; | 10 import android.graphics.Color; |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 public static void setAwDrawSWFunctionTable(int functionTablePointer) { | 296 public static void setAwDrawSWFunctionTable(int functionTablePointer) { |
297 nativeSetAwDrawSWFunctionTable(functionTablePointer); | 297 nativeSetAwDrawSWFunctionTable(functionTablePointer); |
298 } | 298 } |
299 | 299 |
300 public static int getAwDrawGLFunction() { | 300 public static int getAwDrawGLFunction() { |
301 return nativeGetAwDrawGLFunction(); | 301 return nativeGetAwDrawGLFunction(); |
302 } | 302 } |
303 | 303 |
304 public int getAwDrawGLViewContext() { | 304 public int getAwDrawGLViewContext() { |
305 // Using the native pointer as the returned viewContext. This is matched by the | 305 // Using the native pointer as the returned viewContext. This is matched by the |
306 // reinterpret_cast back to AwContents pointer in the native DrawGLFunct ion. | 306 // reinterpret_cast back to AwRenderer pointer in the native DrawGLFunct ion. |
joth
2013/01/21 22:54:24
what's AwRenderer ?
Leandro GraciĆ” Gil
2013/01/22 08:18:46
Good catch. That was my first temporary name for t
| |
307 return mNativeAwContents; | 307 return nativeGetAwDrawGLViewContext(mNativeAwContents); |
308 } | 308 } |
309 | 309 |
310 public boolean onPrepareDrawGL(Canvas canvas) { | 310 public boolean onPrepareDrawGL(Canvas canvas) { |
311 if (mNativeAwContents == 0) return false; | 311 if (mNativeAwContents == 0) return false; |
312 nativeSetScrollForHWFrame(mNativeAwContents, | 312 nativeSetScrollForHWFrame(mNativeAwContents, |
313 mContainerView.getScrollX(), mContainerView.getScrollY()); | 313 mContainerView.getScrollX(), mContainerView.getScrollY()); |
314 | 314 |
315 // returning false will cause a fallback to SW path. | 315 // returning false will cause a fallback to SW path. |
316 return true; | 316 return true; |
317 } | 317 } |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
942 | 942 |
943 private native void nativeDocumentHasImages(int nativeAwContents, Message me ssage); | 943 private native void nativeDocumentHasImages(int nativeAwContents, Message me ssage); |
944 private native void nativeGenerateMHTML( | 944 private native void nativeGenerateMHTML( |
945 int nativeAwContents, String path, ValueCallback<String> callback); | 945 int nativeAwContents, String path, ValueCallback<String> callback); |
946 | 946 |
947 private native void nativeSetIoThreadClient(int nativeAwContents, | 947 private native void nativeSetIoThreadClient(int nativeAwContents, |
948 AwContentsIoThreadClient ioThreadClient); | 948 AwContentsIoThreadClient ioThreadClient); |
949 private native void nativeSetInterceptNavigationDelegate(int nativeAwContent s, | 949 private native void nativeSetInterceptNavigationDelegate(int nativeAwContent s, |
950 InterceptNavigationDelegate navigationInterceptionDelegate); | 950 InterceptNavigationDelegate navigationInterceptionDelegate); |
951 | 951 |
952 private native boolean nativeDrawSW(int nativeAwContents, Canvas canvas); | |
953 private native void nativeSetScrollForHWFrame(int nativeAwContents, int scro llX, int scrollY); | 952 private native void nativeSetScrollForHWFrame(int nativeAwContents, int scro llX, int scrollY); |
954 private native int nativeFindAllSync(int nativeAwContents, String searchStri ng); | 953 private native int nativeFindAllSync(int nativeAwContents, String searchStri ng); |
955 private native void nativeFindAllAsync(int nativeAwContents, String searchSt ring); | 954 private native void nativeFindAllAsync(int nativeAwContents, String searchSt ring); |
956 private native void nativeFindNext(int nativeAwContents, boolean forward); | 955 private native void nativeFindNext(int nativeAwContents, boolean forward); |
957 private native void nativeClearMatches(int nativeAwContents); | 956 private native void nativeClearMatches(int nativeAwContents); |
958 private native void nativeClearCache(int nativeAwContents, boolean includeDi skFiles); | 957 private native void nativeClearCache(int nativeAwContents, boolean includeDi skFiles); |
959 private native byte[] nativeGetCertificate(int nativeAwContents); | 958 private native byte[] nativeGetCertificate(int nativeAwContents); |
960 private native void nativeRequestNewHitTestDataAt(int nativeAwContents, int x, int y); | 959 private native void nativeRequestNewHitTestDataAt(int nativeAwContents, int x, int y); |
961 private native void nativeUpdateLastHitTestData(int nativeAwContents); | 960 private native void nativeUpdateLastHitTestData(int nativeAwContents); |
962 private native void nativeOnSizeChanged(int nativeAwContents, int w, int h, int ow, int oh); | 961 private native void nativeOnSizeChanged(int nativeAwContents, int w, int h, int ow, int oh); |
963 private native void nativeSetWindowViewVisibility(int nativeAwContents, bool ean windowVisible, | 962 private native void nativeSetWindowViewVisibility(int nativeAwContents, bool ean windowVisible, |
964 boolean viewVisible); | 963 boolean viewVisible); |
965 private native void nativeOnAttachedToWindow(int nativeAwContents, int w, in t h); | 964 private native void nativeOnAttachedToWindow(int nativeAwContents, int w, in t h); |
966 private native void nativeOnDetachedFromWindow(int nativeAwContents); | 965 private native void nativeOnDetachedFromWindow(int nativeAwContents); |
967 | 966 |
968 // Returns null if save state fails. | 967 // Returns null if save state fails. |
969 private native byte[] nativeGetOpaqueState(int nativeAwContents); | 968 private native byte[] nativeGetOpaqueState(int nativeAwContents); |
970 | 969 |
971 // Returns false if restore state fails. | 970 // Returns false if restore state fails. |
972 private native boolean nativeRestoreFromOpaqueState(int nativeAwContents, by te[] state); | 971 private native boolean nativeRestoreFromOpaqueState(int nativeAwContents, by te[] state); |
973 | 972 |
974 private native int nativeReleasePopupWebContents(int nativeAwContents); | 973 private native int nativeReleasePopupWebContents(int nativeAwContents); |
975 private native void nativeSetWebContents(int nativeAwContents, int nativeNew WebContents); | 974 private native void nativeSetWebContents(int nativeAwContents, int nativeNew WebContents); |
976 private native void nativeFocusFirstNode(int nativeAwContents); | 975 private native void nativeFocusFirstNode(int nativeAwContents); |
976 | |
977 private native boolean nativeDrawSW(int nativeAwContents, Canvas canvas, int clipX, int clipY, | |
978 int clipW, int clipH); | |
979 private native int nativeGetAwDrawGLViewContext(int nativeAwContents); | |
980 private native Picture nativeCapturePicture(int nativeAwContents); | |
981 private native void nativeEnableOnNewPicture(int nativeAwContents, boolean e nabled, | |
982 boolean invalidationOnly); | |
977 } | 983 } |
OLD | NEW |