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. 4 5package org.chromium.android_webview; 6 7import org.chromium.base.CalledByNative; 8import org.chromium.base.JNINamespace; 9 10/** 11 * Delegate for handling callbacks. All methods are called on the IO thread. 12 * 13 * You should create a separate instance for every WebContents that requires the 14 * provided functionality. 15 */ 16@JNINamespace("android_webview") 17public interface AwContentsIoThreadClient { 18 @CalledByNative 19 public int getCacheMode(); 20 21 @CalledByNative 22 public InterceptedRequestData shouldInterceptRequest(String url, boolean isMainFrame); 23 24 @CalledByNative 25 public boolean shouldBlockContentUrls(); 26 27 @CalledByNative 28 public boolean shouldBlockFileUrls(); 29 30 @CalledByNative 31 public boolean shouldBlockNetworkLoads(); 32 33 @CalledByNative 34 public void onDownloadStart(String url, 35 String userAgent, 36 String contentDisposition, 37 String mimeType, 38 long contentLength); 39 40 @CalledByNative 41 public void newLoginRequest(String realm, String account, String args); 42} 43