| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHILD_WEB_URL_LOADER_IMPL_H_ | 5 #ifndef CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
| 6 #define CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ | 6 #define CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/public/common/resource_response.h" | 11 #include "content/public/common/resource_response.h" |
| 12 #include "mojo/public/cpp/system/data_pipe.h" |
| 12 #include "net/url_request/redirect_info.h" | 13 #include "net/url_request/redirect_info.h" |
| 13 #include "third_party/WebKit/public/platform/WebURLLoader.h" | 14 #include "third_party/WebKit/public/platform/WebURLLoader.h" |
| 14 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 | 18 |
| 18 class SingleThreadTaskRunner; | 19 class SingleThreadTaskRunner; |
| 19 | 20 |
| 20 } // namespace base | 21 } // namespace base |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 | 24 |
| 24 class ResourceDispatcher; | 25 class ResourceDispatcher; |
| 25 struct ResourceResponseInfo; | 26 struct ResourceResponseInfo; |
| 26 | 27 |
| 27 // PlzNavigate: Used to override parameters of the navigation request. | 28 // PlzNavigate: Used to override parameters of the navigation request. |
| 28 struct StreamOverrideParameters { | 29 struct StreamOverrideParameters { |
| 29 public: | 30 public: |
| 30 // TODO(clamy): The browser should be made aware on destruction of this struct | 31 StreamOverrideParameters(); |
| 31 // that it can release its associated stream handle. | 32 ~StreamOverrideParameters(); |
| 32 GURL stream_url; | |
| 33 ResourceResponseHead response; | 33 ResourceResponseHead response; |
| 34 mojo::ScopedDataPipeConsumerHandle mojo_handle; |
| 35 int browser_request_id; |
| 34 }; | 36 }; |
| 35 | 37 |
| 36 class CONTENT_EXPORT WebURLLoaderImpl | 38 class CONTENT_EXPORT WebURLLoaderImpl |
| 37 : public NON_EXPORTED_BASE(blink::WebURLLoader) { | 39 : public NON_EXPORTED_BASE(blink::WebURLLoader) { |
| 38 public: | 40 public: |
| 39 | 41 |
| 40 // Takes ownership of |web_task_runner|. | 42 // Takes ownership of |web_task_runner|. |
| 41 WebURLLoaderImpl(ResourceDispatcher* resource_dispatcher, | 43 WebURLLoaderImpl(ResourceDispatcher* resource_dispatcher, |
| 42 scoped_ptr<blink::WebTaskRunner> web_task_runner); | 44 scoped_ptr<blink::WebTaskRunner> web_task_runner); |
| 43 ~WebURLLoaderImpl() override; | 45 ~WebURLLoaderImpl() override; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 class Context; | 80 class Context; |
| 79 class RequestPeerImpl; | 81 class RequestPeerImpl; |
| 80 scoped_refptr<Context> context_; | 82 scoped_refptr<Context> context_; |
| 81 | 83 |
| 82 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); | 84 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 } // namespace content | 87 } // namespace content |
| 86 | 88 |
| 87 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ | 89 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ |
| OLD | NEW |