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.Rect; | 10 import android.graphics.Rect; |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 mPossiblyStaleHitTestData.href = href; | 823 mPossiblyStaleHitTestData.href = href; |
824 mPossiblyStaleHitTestData.anchorText = anchorText; | 824 mPossiblyStaleHitTestData.anchorText = anchorText; |
825 mPossiblyStaleHitTestData.imgSrc = imgSrc; | 825 mPossiblyStaleHitTestData.imgSrc = imgSrc; |
826 } | 826 } |
827 | 827 |
828 @CalledByNative | 828 @CalledByNative |
829 private void invalidate() { | 829 private void invalidate() { |
830 mContainerView.invalidate(); | 830 mContainerView.invalidate(); |
831 } | 831 } |
832 | 832 |
| 833 @CalledByNative |
| 834 private boolean performLongClick() { |
| 835 return mContainerView.performLongClick(); |
| 836 } |
| 837 |
833 // -------------------------------------------------------------------------
------------------ | 838 // -------------------------------------------------------------------------
------------------ |
834 // Helper methods | 839 // Helper methods |
835 // -------------------------------------------------------------------------
------------------ | 840 // -------------------------------------------------------------------------
------------------ |
836 | 841 |
837 private void saveWebArchiveInternal(String path, final ValueCallback<String>
callback) { | 842 private void saveWebArchiveInternal(String path, final ValueCallback<String>
callback) { |
838 if (path == null || mNativeAwContents == 0) { | 843 if (path == null || mNativeAwContents == 0) { |
839 ThreadUtils.runOnUiThread(new Runnable() { | 844 ThreadUtils.runOnUiThread(new Runnable() { |
840 @Override | 845 @Override |
841 public void run() { | 846 public void run() { |
842 callback.onReceiveValue(null); | 847 callback.onReceiveValue(null); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 private native void nativeOnAttachedToWindow(int nativeAwContents, int w, in
t h); | 943 private native void nativeOnAttachedToWindow(int nativeAwContents, int w, in
t h); |
939 private native void nativeOnDetachedFromWindow(int nativeAwContents); | 944 private native void nativeOnDetachedFromWindow(int nativeAwContents); |
940 | 945 |
941 // Returns null if save state fails. | 946 // Returns null if save state fails. |
942 private native byte[] nativeGetOpaqueState(int nativeAwContents); | 947 private native byte[] nativeGetOpaqueState(int nativeAwContents); |
943 | 948 |
944 // Returns false if restore state fails. | 949 // Returns false if restore state fails. |
945 private native boolean nativeRestoreFromOpaqueState(int nativeAwContents, by
te[] state); | 950 private native boolean nativeRestoreFromOpaqueState(int nativeAwContents, by
te[] state); |
946 | 951 |
947 private native int nativeReleasePopupWebContents(int nativeAwContents); | 952 private native int nativeReleasePopupWebContents(int nativeAwContents); |
948 private native void nativeSetWebContents(int nativeAwContents, int nativeNe
wWebContents); | 953 private native void nativeSetWebContents(int nativeAwContents, int nativeNew
WebContents); |
949 } | 954 } |
OLD | NEW |