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

Unified Diff: chrome/browser/android/download/download_manager_service.h

Issue 2143303002: [Downloads] Expose basic download history to UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lint Created 4 years, 5 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 | « chrome/android/java_sources.gni ('k') | chrome/browser/android/download/download_manager_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/download/download_manager_service.h
diff --git a/chrome/browser/android/download/download_manager_service.h b/chrome/browser/android/download/download_manager_service.h
index 22dfb3e59faabfa629b489a75507103832395643..9c420df5f7019edf15a30f27609581bd0fa9b3e6 100644
--- a/chrome/browser/android/download/download_manager_service.h
+++ b/chrome/browser/android/download/download_manager_service.h
@@ -52,6 +52,10 @@ class DownloadManagerService : public DownloadHistory::Observer {
jobject obj,
const JavaParamRef<jstring>& jdownload_guid);
+ // Called to request that the DownloadManagerService return data about all
+ // downloads in the user's history.
+ void GetAllDownloads(JNIEnv* env, const JavaParamRef<jobject>& obj);
+
// DownloadHistory::Observer methods.
void OnHistoryQueryComplete() override;
@@ -73,6 +77,9 @@ class DownloadManagerService : public DownloadHistory::Observer {
// Helper function to pause a download.
void PauseDownloadInternal(const std::string& download_guid);
+ // Helper function to send info about all downloads to the Java-side.
+ void GetAllDownloadsInternal();
+
// Called to notify the java side that download resumption failed.
void OnResumptionFailed(const std::string& download_guid);
@@ -88,7 +95,7 @@ class DownloadManagerService : public DownloadHistory::Observer {
bool is_history_query_complete_;
- enum DownloadAction { RESUME, PAUSE, CANCEL, UNKNOWN };
+ enum DownloadAction { RESUME, PAUSE, CANCEL, INITIALIZE_UI, UNKNOWN };
using PendingDownloadActions = std::map<std::string, DownloadAction>;
PendingDownloadActions pending_actions_;
« no previous file with comments | « chrome/android/java_sources.gni ('k') | chrome/browser/android/download/download_manager_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698