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

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

Issue 2228193002: [Offline pages] Download UI: Adding Download Service Delegate for notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding a TODO 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/DownloadServiceDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadServiceDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadServiceDelegate.java
new file mode 100644
index 0000000000000000000000000000000000000000..91584e757954bbe2d91584378d5ef46db4648446
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadServiceDelegate.java
@@ -0,0 +1,32 @@
+// Copyright 2016 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.
+
+package org.chromium.chrome.browser.download;
+
+/** Interface for classes implementing concrete implementation of UI behavior. */
+public interface DownloadServiceDelegate {
+ /**
+ * Called to cancel a download.
+ * @param downloadGuid GUID of the download.
+ * @param isOffTheRecord Whether the download is off the record.
+ * @param isNotificationDismissed Whether cancel is caused by dismissing the notification.
+ */
+ void cancelDownload(String downloadGuid, boolean isOffTheRecord,
+ boolean isNotificationDismissed);
+
+ /**
+ * Called to pause a download.
+ * @param downloadGuid GUID of the download.
+ * @param isOffTheRecord Whether the download is off the record.
+ */
+ void pauseDownload(String downloadGuid, boolean isOffTheRecord);
+
+ /**
+ * Called to resume a paused download.
+ * @param item Download item to resume.
+ * @param hasUserGesture Whether the resumption is triggered by user gesture.
+ * TODO(fgorski): Update the interface to not require download item.
+ */
+ void resumeDownload(DownloadItem item, boolean hasUserGesture);
+}

Powered by Google App Engine
This is Rietveld 408576698