OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_MOJO_ASYNC_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/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
16 #include "content/browser/loader/resource_handler.h" | 16 #include "content/browser/loader/resource_handler.h" |
17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
18 #include "content/common/url_loader.mojom.h" | 18 #include "content/common/url_loader.mojom.h" |
19 #include "mojo/public/cpp/bindings/binding.h" | 19 #include "mojo/public/cpp/bindings/binding.h" |
20 #include "mojo/public/cpp/system/watcher.h" | 20 #include "mojo/public/cpp/system/watcher.h" |
21 #include "net/base/io_buffer.h" | 21 #include "net/base/io_buffer.h" |
22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
23 | 23 |
24 namespace net { | 24 namespace net { |
25 class URLRequest; | 25 class URLRequest; |
26 } | 26 } |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 class ResourceDispatcherHostImpl; | 29 class ResourceDispatcherHostImpl; |
30 class ResourceRequestInfoImpl; | |
31 struct ResourceResponse; | 30 struct ResourceResponse; |
32 | 31 |
33 // Used to complete an asynchronous resource request in response to resource | 32 // Used to complete an asynchronous resource request in response to resource |
34 // load events from the resource dispatcher host. This class is used only | 33 // load events from the resource dispatcher host. This class is used only |
35 // when LoadingWithMojo runtime flag is enabled. | 34 // when LoadingWithMojo runtime flag is enabled. |
36 // | 35 // |
37 // TODO(yhirano): Implement redirects. | 36 // TODO(yhirano): Implement redirects. |
38 // TODO(yhirano): Implement downloading to file. | 37 // TODO(yhirano): Implement downloading to file. |
39 // TODO(yhirano): Add histograms. | 38 // TODO(yhirano): Add histograms. |
40 // TODO(yhirano): Set zoom level. | 39 // TODO(yhirano): Set zoom level. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 size_t buffer_offset_ = 0; | 112 size_t buffer_offset_ = 0; |
114 size_t buffer_bytes_read_ = 0; | 113 size_t buffer_bytes_read_ = 0; |
115 scoped_refptr<SharedWriter> shared_writer_; | 114 scoped_refptr<SharedWriter> shared_writer_; |
116 | 115 |
117 DISALLOW_COPY_AND_ASSIGN(MojoAsyncResourceHandler); | 116 DISALLOW_COPY_AND_ASSIGN(MojoAsyncResourceHandler); |
118 }; | 117 }; |
119 | 118 |
120 } // namespace content | 119 } // namespace content |
121 | 120 |
122 #endif // CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ | 121 #endif // CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ |
OLD | NEW |