1 // Copyright 2019 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.chromium.weblayer_private.interfaces; 6 7 import android.content.Intent; 8 import org.chromium.weblayer_private.interfaces.IClientDownload; 9 import org.chromium.weblayer_private.interfaces.IDownload; 10 import org.chromium.weblayer_private.interfaces.IObjectWrapper; 11 12 /** 13 * Used to forward download requests to the client. 14 */ 15 interface IDownloadCallbackClient { interceptDownload(in String uriString, in String userAgent, in String contentDisposition, in String mimetype, long contentLength)16 boolean interceptDownload(in String uriString, in String userAgent, in String contentDisposition, in String mimetype, long contentLength) = 0; allowDownload(in String uriString, in String requestMethod, in String requestInitiatorString, in IObjectWrapper valueCallback)17 void allowDownload(in String uriString, in String requestMethod, in String requestInitiatorString, in IObjectWrapper valueCallback) = 1; 18 IClientDownload createClientDownload(in IDownload impl) = 2; 19 void downloadStarted(IClientDownload download) = 3; 20 void downloadProgressChanged(IClientDownload download) = 4; 21 void downloadCompleted(IClientDownload download) = 5; 22 void downloadFailed(IClientDownload download) = 6; 23 // Removed in 87. 24 // Intent createIntent() = 7; 25 } 26