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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java

Issue 20666003: [Android] Expose showFileChooser in AwContentsClient interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix findbugs Created 7 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java b/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java
index 23f48ebfee447459acda72d290738c76dc3ca034..d26fd9abe582ee34832ca06bb0916d60ac9538fc 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java
@@ -4,6 +4,8 @@
package org.chromium.android_webview;
+import com.google.common.annotations.VisibleForTesting;
+
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
import org.chromium.components.web_contents_delegate_android.WebContentsDelegateAndroid;
@@ -14,8 +16,14 @@ import org.chromium.components.web_contents_delegate_android.WebContentsDelegate
* It should contain abstract WebContentsDelegate methods to be implemented by the embedder.
* These methods belong to WebView but are not shared with the Chromium Android port.
*/
+@VisibleForTesting
@JNINamespace("android_webview")
public abstract class AwWebContentsDelegate extends WebContentsDelegateAndroid {
+ // Callback filesSelectedInChooser() when done.
+ @CalledByNative
+ public abstract void runFileChooser(int processId, int renderId, int mode_flags,
+ String acceptTypes, String title, String defaultFilename, boolean capture);
+
@CalledByNative
public abstract boolean addNewContents(boolean isDialog, boolean isUserGesture);
@@ -33,4 +41,8 @@ public abstract class AwWebContentsDelegate extends WebContentsDelegateAndroid {
@CalledByNative
public void updatePreferredSize(int widthCss, int heightCss) {
}
+
+ // Call in response to a prior runFileChooser call.
+ protected static native void nativeFilesSelectedInChooser(int processId, int renderId,
+ int mode_flags, String[] filePath);
}

Powered by Google App Engine
This is Rietveld 408576698