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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // be called multiple times or not at all if an error occurs. | 125 // be called multiple times or not at all if an error occurs. |
126 virtual void OnReceivedData(const char* data, int len) = 0; | 126 virtual void OnReceivedData(const char* data, int len) = 0; |
127 | 127 |
128 // Called when the response is complete. This method signals completion of | 128 // Called when the response is complete. This method signals completion of |
129 // the resource load.ff | 129 // the resource load.ff |
130 virtual void OnCompletedRequest(const URLRequestStatus& status, | 130 virtual void OnCompletedRequest(const URLRequestStatus& status, |
131 const std::string& security_info) = 0; | 131 const std::string& security_info) = 0; |
132 | 132 |
133 // Returns the URL of the request, which allows us to display it in | 133 // Returns the URL of the request, which allows us to display it in |
134 // debugging situations. | 134 // debugging situations. |
135 virtual std::string GetURLForDebugging() = 0; | 135 virtual GURL GetURLForDebugging() const = 0; |
136 }; | 136 }; |
137 | 137 |
138 // use Create() for construction, but anybody can delete at any time, | 138 // use Create() for construction, but anybody can delete at any time, |
139 // INCLUDING during processing of callbacks. | 139 // INCLUDING during processing of callbacks. |
140 virtual ~ResourceLoaderBridge(); | 140 virtual ~ResourceLoaderBridge(); |
141 | 141 |
142 // Call this method to make a new instance. The method name is a HTTP-style | 142 // Call this method to make a new instance. The method name is a HTTP-style |
143 // method name (e.g., "GET" or "POST"). The URL should be an absolute URL | 143 // method name (e.g., "GET" or "POST"). The URL should be an absolute URL |
144 // encoded in ASCII per the rules of RFC-2396. The referrer parameter is | 144 // encoded in ASCII per the rules of RFC-2396. The referrer parameter is |
145 // optional (may be NULL) and is a URL with similar constraints in how it | 145 // optional (may be NULL) and is a URL with similar constraints in how it |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // construction must go through Create() | 226 // construction must go through Create() |
227 ResourceLoaderBridge(); | 227 ResourceLoaderBridge(); |
228 | 228 |
229 private: | 229 private: |
230 DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge); | 230 DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge); |
231 }; | 231 }; |
232 | 232 |
233 } // namespace webkit_glue | 233 } // namespace webkit_glue |
234 | 234 |
235 #endif // RESOURCE_LOADER_BRIDGE_ | 235 #endif // RESOURCE_LOADER_BRIDGE_ |
OLD | NEW |