Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: content/public/browser/android/download_controller_android.h

Issue 11640007: Make the UI an observer of downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android clang build Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 9
10 namespace content { 10 namespace content {
11 class DownloadItem; 11 class DownloadItem;
12 class RenderViewHost; 12 class RenderViewHost;
13 class WebContents; 13 class WebContents;
14 14
15 // Interface to request GET downloads and send notifications for POST 15 // Interface to request GET downloads and send notifications for POST
16 // downloads. 16 // downloads.
17 class CONTENT_EXPORT DownloadControllerAndroid { 17 class CONTENT_EXPORT DownloadControllerAndroid {
18 public: 18 public:
19 // Returns the singleton instance of the DownloadControllerAndroid. 19 // Returns the singleton instance of the DownloadControllerAndroid.
20 static DownloadControllerAndroid* Get(); 20 static DownloadControllerAndroid* Get();
21 21
22 // Starts a new download request with Android. Should be called on the 22 // Starts a new download request with Android. Should be called on the
23 // UI thread. 23 // UI thread.
24 virtual void CreateGETDownload(RenderViewHost* source, int request_id) = 0; 24 virtual void CreateGETDownload(RenderViewHost* source, int request_id) = 0;
25 25
26 // Should be called when a POST download is started. Notifies the embedding 26 // Should be called when a POST download is started. Notifies the embedding
27 // app about the download. Should be called on the UI thread. 27 // app about the download. Should be called on the UI thread.
28 virtual void OnPostDownloadStarted(WebContents* web_contents, 28 virtual void OnPostDownloadStarted(DownloadItem* download_item) = 0;
29 DownloadItem* download_item) = 0;
30 protected: 29 protected:
31 virtual ~DownloadControllerAndroid() {}; 30 virtual ~DownloadControllerAndroid() {};
32 }; 31 };
33 32
34 } // namespace content 33 } // namespace content
35 34
36 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ 35 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
OLDNEW
« no previous file with comments | « content/browser/download/save_package.cc ('k') | content/public/browser/download_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698