| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ | 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 jobject obj, | 60 jobject obj, |
| 61 const JavaParamRef<jstring>& jdownload_guid, | 61 const JavaParamRef<jstring>& jdownload_guid, |
| 62 bool is_off_the_record); | 62 bool is_off_the_record); |
| 63 | 63 |
| 64 // Called to remove a download item that has GUID equal to |jdownload_guid|. | 64 // Called to remove a download item that has GUID equal to |jdownload_guid|. |
| 65 void RemoveDownload(JNIEnv* env, | 65 void RemoveDownload(JNIEnv* env, |
| 66 jobject obj, | 66 jobject obj, |
| 67 const JavaParamRef<jstring>& jdownload_guid, | 67 const JavaParamRef<jstring>& jdownload_guid, |
| 68 bool is_off_the_record); | 68 bool is_off_the_record); |
| 69 | 69 |
| 70 // Returns whether or not the given download can be opened by the browser. |
| 71 bool IsDownloadOpenableInBrowser(JNIEnv* env, |
| 72 jobject obj, |
| 73 const JavaParamRef<jstring>& jdownload_guid, |
| 74 bool is_off_the_record); |
| 75 |
| 70 // Called to request that the DownloadManagerService return data about all | 76 // Called to request that the DownloadManagerService return data about all |
| 71 // downloads in the user's history. | 77 // downloads in the user's history. |
| 72 void GetAllDownloads(JNIEnv* env, | 78 void GetAllDownloads(JNIEnv* env, |
| 73 const JavaParamRef<jobject>& obj, | 79 const JavaParamRef<jobject>& obj, |
| 74 bool is_off_the_record); | 80 bool is_off_the_record); |
| 75 | 81 |
| 76 // Called to check if the files associated with any downloads have been | 82 // Called to check if the files associated with any downloads have been |
| 77 // removed by an external action. | 83 // removed by an external action. |
| 78 void CheckForExternallyRemovedDownloads(JNIEnv* env, | 84 void CheckForExternallyRemovedDownloads(JNIEnv* env, |
| 79 const JavaParamRef<jobject>& obj, | 85 const JavaParamRef<jobject>& obj, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 158 |
| 153 ResumeCallback resume_callback_for_testing_; | 159 ResumeCallback resume_callback_for_testing_; |
| 154 | 160 |
| 155 std::unique_ptr<AllDownloadItemNotifier> original_notifier_; | 161 std::unique_ptr<AllDownloadItemNotifier> original_notifier_; |
| 156 std::unique_ptr<AllDownloadItemNotifier> off_the_record_notifier_; | 162 std::unique_ptr<AllDownloadItemNotifier> off_the_record_notifier_; |
| 157 | 163 |
| 158 DISALLOW_COPY_AND_ASSIGN(DownloadManagerService); | 164 DISALLOW_COPY_AND_ASSIGN(DownloadManagerService); |
| 159 }; | 165 }; |
| 160 | 166 |
| 161 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ | 167 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ |
| OLD | NEW |