OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ITEM_IMPL_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_DELEGATE_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_DELEGATE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_DELEGATE_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/macros.h" |
10 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
11 #include "content/public/browser/download_danger_type.h" | 14 #include "content/public/browser/download_danger_type.h" |
12 #include "content/public/browser/download_item.h" | 15 #include "content/public/browser/download_item.h" |
13 #include "content/public/browser/download_url_parameters.h" | 16 #include "content/public/browser/download_url_parameters.h" |
14 | 17 |
15 namespace content { | 18 namespace content { |
16 class DownloadItemImpl; | 19 class DownloadItemImpl; |
17 class BrowserContext; | 20 class BrowserContext; |
18 | 21 |
19 // Delegate for operations that a DownloadItemImpl can't do for itself. | 22 // Delegate for operations that a DownloadItemImpl can't do for itself. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 65 |
63 // Checks whether a downloaded file still exists and updates the | 66 // Checks whether a downloaded file still exists and updates the |
64 // file's state if the file is already removed. | 67 // file's state if the file is already removed. |
65 // The check may or may not result in a later asynchronous call | 68 // The check may or may not result in a later asynchronous call |
66 // to OnDownloadedFileRemoved(). | 69 // to OnDownloadedFileRemoved(). |
67 virtual void CheckForFileRemoval(DownloadItemImpl* download_item); | 70 virtual void CheckForFileRemoval(DownloadItemImpl* download_item); |
68 | 71 |
69 // Called when an interrupted download is resumed. | 72 // Called when an interrupted download is resumed. |
70 virtual void ResumeInterruptedDownload( | 73 virtual void ResumeInterruptedDownload( |
71 scoped_ptr<content::DownloadUrlParameters> params, | 74 scoped_ptr<content::DownloadUrlParameters> params, |
72 uint32 id); | 75 uint32_t id); |
73 | 76 |
74 // For contextual issues like language and prefs. | 77 // For contextual issues like language and prefs. |
75 virtual BrowserContext* GetBrowserContext() const; | 78 virtual BrowserContext* GetBrowserContext() const; |
76 | 79 |
77 // Update the persistent store with our information. | 80 // Update the persistent store with our information. |
78 virtual void UpdatePersistence(DownloadItemImpl* download); | 81 virtual void UpdatePersistence(DownloadItemImpl* download); |
79 | 82 |
80 // Opens the file associated with this download. | 83 // Opens the file associated with this download. |
81 virtual void OpenDownload(DownloadItemImpl* download); | 84 virtual void OpenDownload(DownloadItemImpl* download); |
82 | 85 |
(...skipping 10 matching lines...) Expand all Loading... |
93 private: | 96 private: |
94 // For "Outlives attached DownloadItemImpl" invariant assertion. | 97 // For "Outlives attached DownloadItemImpl" invariant assertion. |
95 int count_; | 98 int count_; |
96 | 99 |
97 DISALLOW_COPY_AND_ASSIGN(DownloadItemImplDelegate); | 100 DISALLOW_COPY_AND_ASSIGN(DownloadItemImplDelegate); |
98 }; | 101 }; |
99 | 102 |
100 } // namespace content | 103 } // namespace content |
101 | 104 |
102 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_DELEGATE_H_ | 105 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_DELEGATE_H_ |
OLD | NEW |