1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.chromium.android_webview;
7 import com.google.common.annotations.VisibleForTesting;
9 import org.chromium.base.CalledByNative;
10 import org.chromium.base.JNINamespace;
11 import org.chromium.components.web_contents_delegate_android.WebContentsDelegateAndroid;
14 * WebView-specific WebContentsDelegate.
15 * This file is the Java version of the native class of the same name.
16 * It should contain abstract WebContentsDelegate methods to be implemented by the embedder.
17 * These methods belong to WebView but are not shared with the Chromium Android port.
20 @JNINamespace("android_webview")
21 public abstract class AwWebContentsDelegate extends WebContentsDelegateAndroid {
22 // Callback filesSelectedInChooser() when done.
24 public abstract void runFileChooser(int processId, int renderId, int mode_flags,
25 String acceptTypes, String title, String defaultFilename, boolean capture);
28 public abstract boolean addNewContents(boolean isDialog, boolean isUserGesture);
32 public abstract void closeContents();
36 public abstract void activateContents();
38 // Call in response to a prior runFileChooser call.
39 protected static native void nativeFilesSelectedInChooser(int processId, int renderId,
40 int mode_flags, String[] filePath);