Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / core / src / org / xwalk / core / XWalkContentsIoThreadClient.java
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
3 // found in the LICENSE file.
4
5 package org.xwalk.core;
6
7 import org.chromium.base.CalledByNative;
8 import org.chromium.base.JNINamespace;
9
10 /**
11  * Delegate for handling callbacks. All methods are called on the IO thread.
12  */
13 @JNINamespace("xwalk")
14 interface XWalkContentsIoThreadClient {
15     @CalledByNative
16     public int getCacheMode();
17
18     @CalledByNative
19     public InterceptedRequestData shouldInterceptRequest(String url, boolean isMainFrame);
20
21     @CalledByNative
22     public boolean shouldBlockContentUrls();
23
24     @CalledByNative
25     public boolean shouldBlockFileUrls();
26
27     @CalledByNative
28     public boolean shouldBlockNetworkLoads();
29
30     @CalledByNative
31     public void onDownloadStart(String url,
32                                 String userAgent,
33                                 String contentDisposition,
34                                 String mimeType,
35                                 long contentLength);
36
37     @CalledByNative
38     public void newLoginRequest(String realm, String account, String args);
39 }