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

Unified Diff: content/public/browser/android/download_controller_android.h

Issue 11112022: Add DownloadControllerAndroid public interface for android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding OWNERS file Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/android/download_controller_android.h
diff --git a/content/public/browser/android/download_controller_android.h b/content/public/browser/android/download_controller_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..308bf354e6f113844f81f3e6957d03359a0586bc
--- /dev/null
+++ b/content/public/browser/android/download_controller_android.h
@@ -0,0 +1,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_
+
+namespace content {
+class DownloadItem;
+class RenderViewHost;
+class WebContents;
+
+// Interface to request GET downloads and send notifications for POST
+// downloads.
+class 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(RenderViewHost* source, 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(WebContents* web_contents,
+ DownloadItem* download_item) = 0;
+ protected:
+ virtual ~DownloadControllerAndroid() {};
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698