blob: b4132052e4c9c9dd217bd8ccb2d0cc410cabb7e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
#define CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
#include "content/common/content_export.h"
namespace content {
class DownloadItem;
// Interface to request GET downloads and send notifications for POST
// downloads.
class CONTENT_EXPORT DownloadControllerAndroid {
public:
// Returns the singleton instance of the DownloadControllerAndroid.
static DownloadControllerAndroid* Get();
// Starts a new download request with Android. Should be called on the
// UI thread.
virtual void CreateGETDownload(int render_process_id, int render_view_id,
int request_id) = 0;
// Should be called when a POST download is started. Notifies the embedding
// app about the download. Should be called on the UI thread.
virtual void OnPostDownloadStarted(DownloadItem* download_item) = 0;
protected:
virtual ~DownloadControllerAndroid() {};
};
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
|