Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 11471040: [Android WebView] Convert context menu callback to long press (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid ownership weirdness by using aw_contents (like in PS1). FactoryFn. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698