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 org.chromium.base.CalledByNative;
8 import org.chromium.base.JNINamespace;
9 import org.chromium.base.VisibleForTesting;
10 import org.chromium.components.web_contents_delegate_android.WebContentsDelegateAndroid;
13 * WebView-specific WebContentsDelegate.
14 * This file is the Java version of the native class of the same name.
15 * It should contain abstract WebContentsDelegate methods to be implemented by the embedder.
16 * These methods belong to WebView but are not shared with the Chromium Android port.
19 @JNINamespace("android_webview")
20 public abstract class AwWebContentsDelegate extends WebContentsDelegateAndroid {
21 // Callback filesSelectedInChooser() when done.
23 public abstract void runFileChooser(int processId, int renderId, int modeFlags,
24 String acceptTypes, String title, String defaultFilename, boolean capture);
27 public abstract boolean addNewContents(boolean isDialog, boolean isUserGesture);
31 public abstract void closeContents();
35 public abstract void activateContents();
39 public abstract void toggleFullscreenModeForTab(boolean enterFullscreen);
41 // Call in response to a prior runFileChooser call.
42 protected static native void nativeFilesSelectedInChooser(int processId, int renderId,
43 int modeFlags, String[] filePath, String[] displayName);