• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
5 package org.chromium.content.browser;
6 
7 /**
8  * Interface to be implemented by the embedder to handle file downloads.
9  */
10 public interface ContentViewDownloadDelegate {
11     /**
12     * Notify the host application that a file should be downloaded. Replaces
13     * onDownloadStart from DownloadListener.
14     * @param downloadInfo Information about the requested download.
15     */
requestHttpGetDownload(DownloadInfo downloadInfo)16     void requestHttpGetDownload(DownloadInfo downloadInfo);
17 
18     /**
19      * Notify the host application that a download is started.
20      * @param filename File name of the downloaded file.
21      * @param mimeType Mime of the downloaded item.
22      */
onDownloadStarted(String filename, String mimeType)23     void onDownloadStarted(String filename, String mimeType);
24 
25     /**
26      * Notify the host application that a download has an extension indicating
27      * a dangerous file type.
28      * @param filename File name of the downloaded file.
29      * @param downloadId The download id.
30      */
onDangerousDownload(String filename, int downloadId)31     void onDangerousDownload(String filename, int downloadId);
32 }
33