| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // | 173 // |
| 174 // routing_id passed to this function allows it to be associated with a | 174 // routing_id passed to this function allows it to be associated with a |
| 175 // frame's network context. | 175 // frame's network context. |
| 176 static ResourceLoaderBridge* Create(const std::string& method, | 176 static ResourceLoaderBridge* Create(const std::string& method, |
| 177 const GURL& url, | 177 const GURL& url, |
| 178 const GURL& policy_url, | 178 const GURL& policy_url, |
| 179 const GURL& referrer, | 179 const GURL& referrer, |
| 180 const std::string& frame_origin, | 180 const std::string& frame_origin, |
| 181 const std::string& main_frame_origin, | 181 const std::string& main_frame_origin, |
| 182 const std::string& headers, | 182 const std::string& headers, |
| 183 const std::string& default_mime_type, |
| 183 int load_flags, | 184 int load_flags, |
| 184 int requestor_pid, | 185 int requestor_pid, |
| 185 ResourceType::Type request_type, | 186 ResourceType::Type request_type, |
| 186 int routing_id); | 187 int routing_id); |
| 187 | 188 |
| 188 // Call this method before calling Start() to append a chunk of binary data | 189 // Call this method before calling Start() to append a chunk of binary data |
| 189 // to the request body. May only be used with HTTP(S) POST requests. | 190 // to the request body. May only be used with HTTP(S) POST requests. |
| 190 virtual void AppendDataToUpload(const char* data, int data_len) = 0; | 191 virtual void AppendDataToUpload(const char* data, int data_len) = 0; |
| 191 | 192 |
| 192 // Call this method before calling Start() to append the contents of a file | 193 // Call this method before calling Start() to append the contents of a file |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // construction must go through Create() | 233 // construction must go through Create() |
| 233 ResourceLoaderBridge(); | 234 ResourceLoaderBridge(); |
| 234 | 235 |
| 235 private: | 236 private: |
| 236 DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge); | 237 DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge); |
| 237 }; | 238 }; |
| 238 | 239 |
| 239 } // namespace webkit_glue | 240 } // namespace webkit_glue |
| 240 | 241 |
| 241 #endif // RESOURCE_LOADER_BRIDGE_ | 242 #endif // RESOURCE_LOADER_BRIDGE_ |
| OLD | NEW |