| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 virtual void UpdateItemInPersistentStore(DownloadItem* item) = 0; | 77 virtual void UpdateItemInPersistentStore(DownloadItem* item) = 0; |
| 78 | 78 |
| 79 // Notifies the delegate that path for the download item has changed, so that | 79 // Notifies the delegate that path for the download item has changed, so that |
| 80 // it can update its persistent store. | 80 // it can update its persistent store. |
| 81 virtual void UpdatePathForItemInPersistentStore( | 81 virtual void UpdatePathForItemInPersistentStore( |
| 82 DownloadItem* item, | 82 DownloadItem* item, |
| 83 const FilePath& new_path) = 0; | 83 const FilePath& new_path) = 0; |
| 84 | 84 |
| 85 // Notifies the delegate that it should remove the download item from its | 85 // Notifies the delegate that it should remove the download item from its |
| 86 // persistent store. | 86 // persistent store. |
| 87 virtual void RemoveItemFromPersistentStore(int64 db_handle) = 0; | 87 virtual void RemoveItemFromPersistentStore(DownloadItem* item) = 0; |
| 88 | 88 |
| 89 // Notifies the delegate to remove downloads from the given time range. | 89 // Notifies the delegate to remove downloads from the given time range. |
| 90 virtual void RemoveItemsFromPersistentStoreBetween( | 90 virtual void RemoveItemsFromPersistentStoreBetween( |
| 91 const base::Time remove_begin, | 91 const base::Time remove_begin, |
| 92 const base::Time remove_end) = 0; | 92 const base::Time remove_end) = 0; |
| 93 | 93 |
| 94 // Retrieve the directories to save html pages and downloads to. | 94 // Retrieve the directories to save html pages and downloads to. |
| 95 virtual void GetSaveDir(TabContents* tab_contents, | 95 virtual void GetSaveDir(TabContents* tab_contents, |
| 96 FilePath* website_save_dir, | 96 FilePath* website_save_dir, |
| 97 FilePath* download_save_dir) = 0; | 97 FilePath* download_save_dir) = 0; |
| 98 | 98 |
| 99 // Asks the user for the path to save a page. The delegate calls | 99 // Asks the user for the path to save a page. The delegate calls |
| 100 // SavePackage::OnPathPicked to give the answer. | 100 // SavePackage::OnPathPicked to give the answer. |
| 101 virtual void ChooseSavePath(const base::WeakPtr<SavePackage>& save_package, | 101 virtual void ChooseSavePath(const base::WeakPtr<SavePackage>& save_package, |
| 102 const FilePath& suggested_path, | 102 const FilePath& suggested_path, |
| 103 bool can_save_as_complete) = 0; | 103 bool can_save_as_complete) = 0; |
| 104 | 104 |
| 105 // Informs the delegate that the progress of downloads has changed. | 105 // Informs the delegate that the progress of downloads has changed. |
| 106 virtual void DownloadProgressUpdated() = 0; | 106 virtual void DownloadProgressUpdated() = 0; |
| 107 | 107 |
| 108 protected: | 108 protected: |
| 109 DownloadManagerDelegate() {} | 109 DownloadManagerDelegate() {} |
| 110 | 110 |
| 111 DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegate); | 111 DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegate); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ | 114 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |