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 8a6c207784fa9ae4add20b26bfe481101b279138..a9a9670c2cf584c06bf5a273733e6da1037c7adc 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 |
@@ -1149,12 +1149,14 @@ 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. |
+ * @param mimeType MIME type of the file. |
* @return Whether the download is openable by the browser. |
*/ |
@Override |
- public boolean isDownloadOpenableInBrowser(String downloadGuid, boolean isOffTheRecord) { |
- return nativeIsDownloadOpenableInBrowser( |
- getNativeDownloadManagerService(), downloadGuid, isOffTheRecord); |
+ public boolean isDownloadOpenableInBrowser( |
+ String downloadGuid, boolean isOffTheRecord, String mimeType) { |
+ // TODO(qinmin): for audio and video, check if the codec is supported by Chrome. |
+ return isSupportedMimeType(mimeType); |
} |
/** |
@@ -1658,8 +1660,6 @@ 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( |