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

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: addressing comments 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
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/DownloadController.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 download is started. It can be either a GET
28 // request with authentication or a POST request. Notifies the embedding
26 // app about the download. Should be called on the UI thread. 29 // app about the download. Should be called on the UI thread.
27 virtual void OnPostDownloadStarted(DownloadItem* download_item) = 0; 30 virtual void OnDownloadStarted(DownloadItem* download_item) = 0;
31
32 // Called when a download is initiated by context menu.
33 virtual void StartContextMenuDownload(
34 const ContextMenuParams& params, WebContents* web_contents,
35 bool is_link) = 0;
36
28 protected: 37 protected:
29 virtual ~DownloadControllerAndroid() {}; 38 virtual ~DownloadControllerAndroid() {};
30 }; 39 };
31 40
32 } // namespace content 41 } // namespace content
33 42
34 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ 43 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/DownloadController.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698