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

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

Issue 13859009: Adding a call to support download initiated context menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 #include "content/public/common/context_menu_params.h"
9 10
10 namespace content { 11 namespace content {
11 class DownloadItem; 12 class DownloadItem;
13 class WebContents;
12 14
13 // Interface to request GET downloads and send notifications for POST 15 // Interface to request GET downloads and send notifications for POST
14 // downloads. 16 // downloads.
15 class CONTENT_EXPORT DownloadControllerAndroid { 17 class CONTENT_EXPORT DownloadControllerAndroid {
16 public: 18 public:
17 // Returns the singleton instance of the DownloadControllerAndroid. 19 // Returns the singleton instance of the DownloadControllerAndroid.
18 static DownloadControllerAndroid* Get(); 20 static DownloadControllerAndroid* Get();
19 21
20 // 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
21 // UI thread. 23 // UI thread.
22 virtual void CreateGETDownload(int render_process_id, int render_view_id, 24 virtual void CreateGETDownload(int render_process_id, int render_view_id,
23 int request_id) = 0; 25 int request_id) = 0;
24 26
25 // Should be called when a POST download is started. Notifies the embedding 27 // Should be called when a POST download is started. Notifies the embedding
26 // app about the download. Should be called on the UI thread. 28 // app about the download. Should be called on the UI thread.
27 virtual void OnPostDownloadStarted(DownloadItem* download_item) = 0; 29 virtual void OnPostDownloadStarted(DownloadItem* download_item) = 0;
nilesh 2013/04/12 16:44:14 Also rename this to OnDownloadStarted. With this a
nilesh 2013/04/12 16:50:07 actually you can add a note in the comment and a T
qinmin 2013/04/15 18:56:51 Done.
qinmin 2013/04/15 18:56:51 Fixed naming in all the related classes, and also
30
31 // Called when a download is initiated by context menu.
32 virtual void StartContextMenuDownload(
33 const ContextMenuParams& params, WebContents* web_contents,
34 bool is_link) = 0;
nilesh 2013/04/12 16:27:45 looking at the caller, is_link can be decided base
qinmin 2013/04/15 18:56:51 we still need this. We need to know whether "save
35
28 protected: 36 protected:
29 virtual ~DownloadControllerAndroid() {}; 37 virtual ~DownloadControllerAndroid() {};
30 }; 38 };
31 39
32 } // namespace content 40 } // namespace content
33 41
34 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ 42 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698