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

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

Issue 2343363005: [Download Home] Open supported files in Custom Tabs (Closed)
Patch Set: Comments Created 4 years, 3 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 e9c2b80eb17b0a7d724a2805166e74e33c546fd2..1e066368a6397f9b429cf2949f4ccfcc5e1bd2f0 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
@@ -1174,6 +1174,18 @@ public class DownloadManagerService extends BroadcastReceiver implements
}
/**
+ * Checks whether the download can be opened by the browser.
+ * @param downloadGuid GUID of the download.
+ * @param isOffTheRecord Whether the download is off the record.
+ * @return Whether the download is openable by the browser.
+ */
+ @Override
+ public boolean isDownloadOpenableInBrowser(String downloadGuid, boolean isOffTheRecord) {
+ return nativeIsDownloadOpenableInBrowser(
+ getNativeDownloadManagerService(), downloadGuid, isOffTheRecord);
+ }
+
+ /**
* Helper method to create and retrieve the native DownloadManagerService when needed.
* @return pointer to native DownloadManagerService.
*/
@@ -1659,6 +1671,8 @@ public class DownloadManagerService extends BroadcastReceiver implements
boolean isOffTheRecord);
private native void nativeRemoveDownload(long nativeDownloadManagerService, String downloadGuid,
boolean isOffTheRecord);
+ private native boolean nativeIsDownloadOpenableInBrowser(
+ long nativeDownloadManagerService, String downloadGuid, boolean isOffTheRecord);
private native void nativeGetAllDownloads(
long nativeDownloadManagerService, boolean isOffTheRecord);
private native void nativeCheckForExternallyRemovedDownloads(

Powered by Google App Engine
This is Rietveld 408576698