| 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 // The intent of this file is to provide a type-neutral abstraction between | 5 // The intent of this file is to provide a type-neutral abstraction between |
| 6 // Chrome and WebKit for resource loading. This pure-virtual interface is | 6 // Chrome and WebKit for resource loading. This pure-virtual interface is |
| 7 // implemented by the embedder, which also provides a factory method Create | 7 // implemented by the embedder, which also provides a factory method Create |
| 8 // to instantiate this object. | 8 // to instantiate this object. |
| 9 // | 9 // |
| 10 // One of these objects will be created by WebKit for each request. WebKit | 10 // One of these objects will be created by WebKit for each request. WebKit |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #if defined(OS_POSIX) | 24 #if defined(OS_POSIX) |
| 25 #include "base/file_descriptor_posix.h" | 25 #include "base/file_descriptor_posix.h" |
| 26 #endif | 26 #endif |
| 27 #include "base/file_path.h" | 27 #include "base/file_path.h" |
| 28 #include "base/platform_file.h" | 28 #include "base/platform_file.h" |
| 29 #include "base/ref_counted.h" | 29 #include "base/ref_counted.h" |
| 30 #include "base/scoped_ptr.h" | 30 #include "base/scoped_ptr.h" |
| 31 #include "base/time.h" | 31 #include "base/time.h" |
| 32 #include "base/values.h" | 32 #include "base/values.h" |
| 33 #include "googleurl/src/gurl.h" | 33 #include "googleurl/src/gurl.h" |
| 34 #include "net/base/host_port_pair.h" |
| 34 #include "net/url_request/url_request_status.h" | 35 #include "net/url_request/url_request_status.h" |
| 35 #include "webkit/glue/resource_type.h" | 36 #include "webkit/glue/resource_type.h" |
| 36 | 37 |
| 37 namespace net { | 38 namespace net { |
| 38 class HttpResponseHeaders; | 39 class HttpResponseHeaders; |
| 39 } | 40 } |
| 40 | 41 |
| 41 namespace webkit_glue { | 42 namespace webkit_glue { |
| 42 | 43 |
| 43 // Structure containing timing information for the request. It addresses | 44 // Structure containing timing information for the request. It addresses |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 bool was_npn_negotiated; | 176 bool was_npn_negotiated; |
| 176 | 177 |
| 177 // True if response could use alternate protocol. However, browser will | 178 // True if response could use alternate protocol. However, browser will |
| 178 // ignore the alternate protocol when spdy is not enabled on browser side. | 179 // ignore the alternate protocol when spdy is not enabled on browser side. |
| 179 bool was_alternate_protocol_available; | 180 bool was_alternate_protocol_available; |
| 180 | 181 |
| 181 // True if the response was fetched via an explicit proxy (as opposed to a | 182 // True if the response was fetched via an explicit proxy (as opposed to a |
| 182 // transparent proxy). The proxy could be any type of proxy, HTTP or SOCKS. | 183 // transparent proxy). The proxy could be any type of proxy, HTTP or SOCKS. |
| 183 // Note: we cannot tell if a transparent proxy may have been involved. | 184 // Note: we cannot tell if a transparent proxy may have been involved. |
| 184 bool was_fetched_via_proxy; | 185 bool was_fetched_via_proxy; |
| 186 |
| 187 // Remote address of the socket which fetched this resource. |
| 188 net::HostPortPair socket_address; |
| 185 }; | 189 }; |
| 186 | 190 |
| 187 class ResourceLoaderBridge { | 191 class ResourceLoaderBridge { |
| 188 public: | 192 public: |
| 189 // Structure used when calling ResourceLoaderBridge::Create(). | 193 // Structure used when calling ResourceLoaderBridge::Create(). |
| 190 struct RequestInfo { | 194 struct RequestInfo { |
| 191 RequestInfo(); | 195 RequestInfo(); |
| 192 ~RequestInfo(); | 196 ~RequestInfo(); |
| 193 | 197 |
| 194 // HTTP-style method name (e.g., "GET" or "POST"). | 198 // HTTP-style method name (e.g., "GET" or "POST"). |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 // construction must go through Create() | 381 // construction must go through Create() |
| 378 ResourceLoaderBridge(); | 382 ResourceLoaderBridge(); |
| 379 | 383 |
| 380 private: | 384 private: |
| 381 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); | 385 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); |
| 382 }; | 386 }; |
| 383 | 387 |
| 384 } // namespace webkit_glue | 388 } // namespace webkit_glue |
| 385 | 389 |
| 386 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ | 390 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ |
| OLD | NEW |