Upstream version 8.36.169.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / core_internal / src / org / xwalk / core / internal / XWalkWebContentsDelegate.java
1 // Copyright (c) 2013 Intel Corporation. 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.
4
5 package org.xwalk.core.internal;
6
7 import android.view.KeyEvent;
8
9 import org.chromium.base.CalledByNative;
10 import org.chromium.base.JNINamespace;
11 import org.chromium.components.web_contents_delegate_android.WebContentsDelegateAndroid;
12
13 @JNINamespace("xwalk")
14 abstract class XWalkWebContentsDelegate extends WebContentsDelegateAndroid {
15     @CalledByNative
16     public abstract boolean shouldOpenWithDefaultBrowser(String contentUrl);
17
18     @CalledByNative
19     public abstract boolean addNewContents(boolean isDialog, boolean isUserGesture);
20
21     @CalledByNative
22     public abstract void closeContents();
23
24     @CalledByNative
25     public abstract void activateContents();
26
27     @CalledByNative
28     public abstract void rendererUnresponsive();
29
30     @CalledByNative
31     public abstract void rendererResponsive();
32
33     @CalledByNative
34     public abstract void handleKeyboardEvent(KeyEvent event);
35
36     @CalledByNative
37     public abstract boolean shouldOverrideRunFileChooser(
38             int processId, int renderId, int mode,
39             String acceptTypes, boolean capture);
40
41     @CalledByNative
42     public void updatePreferredSize(int widthCss, int heightCss) {
43     }
44
45     @CalledByNative
46     public void toggleFullscreen(boolean enterFullscreen) {
47     }
48
49     @CalledByNative
50     public boolean isFullscreen() {
51         return false;
52     }
53 }