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_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "content/browser/download/download_request_core.h" | 15 #include "content/browser/download/download_request_core.h" |
16 #include "content/browser/loader/resource_handler.h" | 16 #include "content/browser/loader/resource_handler.h" |
17 #include "content/public/browser/download_interrupt_reasons.h" | 17 #include "content/public/browser/download_interrupt_reasons.h" |
18 #include "content/public/browser/download_manager.h" | 18 #include "content/public/browser/download_manager.h" |
19 #include "content/public/browser/download_save_info.h" | 19 #include "content/public/browser/download_save_info.h" |
20 #include "content/public/browser/download_url_parameters.h" | 20 #include "content/public/browser/download_url_parameters.h" |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 class URLRequest; | 23 class URLRequest; |
24 } // namespace net | 24 } // namespace net |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 class ByteStreamReader; | 27 class ByteStreamReader; |
28 class ByteStreamWriter; | |
29 class DownloadRequestHandle; | |
30 class PowerSaveBlocker; | |
31 struct DownloadCreateInfo; | 28 struct DownloadCreateInfo; |
32 | 29 |
33 // Forwards data to the download thread. | 30 // Forwards data to the download thread. |
34 class CONTENT_EXPORT DownloadResourceHandler | 31 class CONTENT_EXPORT DownloadResourceHandler |
35 : public ResourceHandler, | 32 : public ResourceHandler, |
36 public DownloadRequestCore::Delegate, | 33 public DownloadRequestCore::Delegate, |
37 public base::SupportsWeakPtr<DownloadResourceHandler> { | 34 public base::SupportsWeakPtr<DownloadResourceHandler> { |
38 public: | 35 public: |
39 struct DownloadTabInfo; | 36 struct DownloadTabInfo; |
40 | 37 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // deletion must occur on the IO thread. | 99 // deletion must occur on the IO thread. |
103 std::unique_ptr<DownloadTabInfo> tab_info_; | 100 std::unique_ptr<DownloadTabInfo> tab_info_; |
104 | 101 |
105 DownloadRequestCore core_; | 102 DownloadRequestCore core_; |
106 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); | 103 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); |
107 }; | 104 }; |
108 | 105 |
109 } // namespace content | 106 } // namespace content |
110 | 107 |
111 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ | 108 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ |
OLD | NEW |