| 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 public void requestImageRef(Message msg) { | 666 public void requestImageRef(Message msg) { |
| 667 if (msg == null || mNativeAwContents == 0) return; | 667 if (msg == null || mNativeAwContents == 0) return; |
| 668 | 668 |
| 669 nativeUpdateLastHitTestData(mNativeAwContents); | 669 nativeUpdateLastHitTestData(mNativeAwContents); |
| 670 Bundle data = msg.getData(); | 670 Bundle data = msg.getData(); |
| 671 data.putString("url", mPossiblyStaleHitTestData.imgSrc); | 671 data.putString("url", mPossiblyStaleHitTestData.imgSrc); |
| 672 msg.setData(data); | 672 msg.setData(data); |
| 673 msg.sendToTarget(); | 673 msg.sendToTarget(); |
| 674 } | 674 } |
| 675 | 675 |
| 676 public void resetScrollAndScaleState() { |
| 677 ThreadUtils.runOnUiThreadBlocking(new Runnable() { |
| 678 @Override |
| 679 public void run() { |
| 680 nativeResetScrollAndScaleState(mNativeAwContents); |
| 681 } |
| 682 }); |
| 683 } |
| 684 |
| 676 //--------------------------------------------------------------------------
------------------ | 685 //--------------------------------------------------------------------------
------------------ |
| 677 // View and ViewGroup method implementations | 686 // View and ViewGroup method implementations |
| 678 //--------------------------------------------------------------------------
------------------ | 687 //--------------------------------------------------------------------------
------------------ |
| 679 | 688 |
| 680 /** | 689 /** |
| 681 * @see android.webkit.View#onTouchEvent() | 690 * @see android.webkit.View#onTouchEvent() |
| 682 */ | 691 */ |
| 683 public boolean onTouchEvent(MotionEvent event) { | 692 public boolean onTouchEvent(MotionEvent event) { |
| 684 if (mNativeAwContents == 0) return false; | 693 if (mNativeAwContents == 0) return false; |
| 685 boolean rv = mContentViewCore.onTouchEvent(event); | 694 boolean rv = mContentViewCore.onTouchEvent(event); |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 // Returns null if save state fails. | 1071 // Returns null if save state fails. |
| 1063 private native byte[] nativeGetOpaqueState(int nativeAwContents); | 1072 private native byte[] nativeGetOpaqueState(int nativeAwContents); |
| 1064 | 1073 |
| 1065 // Returns false if restore state fails. | 1074 // Returns false if restore state fails. |
| 1066 private native boolean nativeRestoreFromOpaqueState(int nativeAwContents, by
te[] state); | 1075 private native boolean nativeRestoreFromOpaqueState(int nativeAwContents, by
te[] state); |
| 1067 | 1076 |
| 1068 private native int nativeReleasePopupWebContents(int nativeAwContents); | 1077 private native int nativeReleasePopupWebContents(int nativeAwContents); |
| 1069 private native void nativeSetWebContents(int nativeAwContents, int nativeNew
WebContents); | 1078 private native void nativeSetWebContents(int nativeAwContents, int nativeNew
WebContents); |
| 1070 private native void nativeFocusFirstNode(int nativeAwContents); | 1079 private native void nativeFocusFirstNode(int nativeAwContents); |
| 1071 | 1080 |
| 1081 private native void nativeResetScrollAndScaleState(int nativeAwContents); |
| 1082 |
| 1072 private native boolean nativeDrawSW(int nativeAwContents, Canvas canvas, int
clipX, int clipY, | 1083 private native boolean nativeDrawSW(int nativeAwContents, Canvas canvas, int
clipX, int clipY, |
| 1073 int clipW, int clipH); | 1084 int clipW, int clipH); |
| 1074 private native int nativeGetAwDrawGLViewContext(int nativeAwContents); | 1085 private native int nativeGetAwDrawGLViewContext(int nativeAwContents); |
| 1075 private native Picture nativeCapturePicture(int nativeAwContents); | 1086 private native Picture nativeCapturePicture(int nativeAwContents); |
| 1076 private native void nativeEnableOnNewPicture(int nativeAwContents, boolean e
nabled, | 1087 private native void nativeEnableOnNewPicture(int nativeAwContents, boolean e
nabled, |
| 1077 boolean invalidationOnly); | 1088 boolean invalidationOnly); |
| 1078 | 1089 |
| 1079 private native void nativeInvokeGeolocationCallback( | 1090 private native void nativeInvokeGeolocationCallback( |
| 1080 int nativeAwContents, boolean value, String requestingFrame); | 1091 int nativeAwContents, boolean value, String requestingFrame); |
| 1081 } | 1092 } |
| OLD | NEW |