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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java

Issue 2239133002: [Offline pages] Downloads UI: Adding bridge for issuing notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@download-notifications
Patch Set: Addressing CR feedback Created 4 years, 4 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
Index: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
index 0d3abdda260731b84006bf3b8d0edafc0a416a66..6fc3b473105d3c01c1d252af630cd7cf8375033c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
@@ -288,6 +288,10 @@ public class DownloadManagerService extends BroadcastReceiver implements
mDownloadManagerDelegate = downloadManagerDelegate;
}
+ public DownloadNotifier getDownloadNotifier() {
+ return mDownloadNotifier;
+ }
+
@Override
public void onDownloadCompleted(final DownloadInfo downloadInfo) {
int status = DOWNLOAD_STATUS_COMPLETE;
@@ -1076,6 +1080,7 @@ public class DownloadManagerService extends BroadcastReceiver implements
* @param item Download item to resume.
* @param hasUserGesture Whether the resumption is triggered by user gesture.
*/
+ @Override
public void resumeDownload(DownloadItem item, boolean hasUserGesture) {
DownloadProgress progress = mDownloadProgressMap.get(item.getId());
if (progress != null && progress.mDownloadStatus == DOWNLOAD_STATUS_IN_PROGRESS
@@ -1111,8 +1116,9 @@ public class DownloadManagerService extends BroadcastReceiver implements
* @param isOffTheRecord Whether the download is off the record.
* @param isNotificationDismissed Whether cancel is caused by dismissing the notification.
*/
- public void cancelDownload(String downloadGuid, boolean isOffTheRecord,
- boolean isNotificationDismissed) {
+ @Override
+ public void cancelDownload(
+ String downloadGuid, boolean isOffTheRecord, boolean isNotificationDismissed) {
nativeCancelDownload(getNativeDownloadManagerService(), downloadGuid, isOffTheRecord,
isNotificationDismissed);
removeDownloadProgress(downloadGuid);
@@ -1124,6 +1130,7 @@ public class DownloadManagerService extends BroadcastReceiver implements
* @param downloadGuid GUID of the download.
* @param isOffTheRecord Whether the download is off the record.
*/
+ @Override
public void pauseDownload(String downloadGuid, boolean isOffTheRecord) {
nativePauseDownload(getNativeDownloadManagerService(), downloadGuid, isOffTheRecord);
DownloadProgress progress = mDownloadProgressMap.get(downloadGuid);
@@ -1138,6 +1145,17 @@ public class DownloadManagerService extends BroadcastReceiver implements
}
}
+ @Override
+ public void openItem(String downloadGuid) {
+ // Downloads managed by DownloadManagerService are opened through an intent to the
+ // DownloadManager.
+ }
+
+ @Override
+ public void destroyServiceDelegate() {
+ // Lifecycle of DownloadManagerService allows for this call to be ignored.
+ }
+
/**
* Removes a download from the list.
* @param downloadGuid GUID of the download.

Powered by Google App Engine
This is Rietveld 408576698