| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 6 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 // only. | 226 // only. |
| 227 void OnBeforeRedirect(void* browser_context, | 227 void OnBeforeRedirect(void* browser_context, |
| 228 const extensions::InfoMap* extension_info_map, | 228 const extensions::InfoMap* extension_info_map, |
| 229 net::URLRequest* request, | 229 net::URLRequest* request, |
| 230 const GURL& new_location); | 230 const GURL& new_location); |
| 231 | 231 |
| 232 // Dispatches the onResponseStarted event indicating that the first bytes of | 232 // Dispatches the onResponseStarted event indicating that the first bytes of |
| 233 // the response have arrived. | 233 // the response have arrived. |
| 234 void OnResponseStarted(void* browser_context, | 234 void OnResponseStarted(void* browser_context, |
| 235 const extensions::InfoMap* extension_info_map, | 235 const extensions::InfoMap* extension_info_map, |
| 236 net::URLRequest* request, | |
| 237 int net_error); | |
| 238 // Deprecated. | |
| 239 // TODO(maksims): Remove this. | |
| 240 void OnResponseStarted(void* browser_context, | |
| 241 const extensions::InfoMap* extension_info_map, | |
| 242 net::URLRequest* request); | 236 net::URLRequest* request); |
| 243 | 237 |
| 244 // Dispatches the onComplete event. | 238 // Dispatches the onComplete event. |
| 245 void OnCompleted(void* browser_context, | 239 void OnCompleted(void* browser_context, |
| 246 const extensions::InfoMap* extension_info_map, | 240 const extensions::InfoMap* extension_info_map, |
| 247 net::URLRequest* request, | |
| 248 int net_error); | |
| 249 // Deprecated. | |
| 250 // TODO(maksims): Remove this. | |
| 251 void OnCompleted(void* browser_context, | |
| 252 const extensions::InfoMap* extension_info_map, | |
| 253 net::URLRequest* request); | 241 net::URLRequest* request); |
| 254 | 242 |
| 255 // Dispatches an onErrorOccurred event. | 243 // Dispatches an onErrorOccurred event. |
| 256 void OnErrorOccurred(void* browser_context, | 244 void OnErrorOccurred(void* browser_context, |
| 257 const extensions::InfoMap* extension_info_map, | 245 const extensions::InfoMap* extension_info_map, |
| 258 net::URLRequest* request, | 246 net::URLRequest* request, |
| 259 bool started, | |
| 260 int net_error); | |
| 261 // Deprecated. | |
| 262 // TODO(maksims): Remove this. | |
| 263 void OnErrorOccurred(void* browser_context, | |
| 264 const extensions::InfoMap* extension_info_map, | |
| 265 net::URLRequest* request, | |
| 266 bool started); | 247 bool started); |
| 267 | 248 |
| 268 // Notifications when objects are going away. | 249 // Notifications when objects are going away. |
| 269 void OnURLRequestDestroyed(void* browser_context, | 250 void OnURLRequestDestroyed(void* browser_context, |
| 270 const net::URLRequest* request); | 251 const net::URLRequest* request); |
| 271 | 252 |
| 272 // Called when an event listener handles a blocking event and responds. | 253 // Called when an event listener handles a blocking event and responds. |
| 273 void OnEventHandled(void* browser_context, | 254 void OnEventHandled(void* browser_context, |
| 274 const std::string& extension_id, | 255 const std::string& extension_id, |
| 275 const std::string& event_name, | 256 const std::string& event_name, |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 extensions::QuotaLimitHeuristics* heuristics) const override; | 534 extensions::QuotaLimitHeuristics* heuristics) const override; |
| 554 // Handle quota exceeded gracefully: Only warn the user but still execute the | 535 // Handle quota exceeded gracefully: Only warn the user but still execute the |
| 555 // function. | 536 // function. |
| 556 void OnQuotaExceeded(const std::string& error) override; | 537 void OnQuotaExceeded(const std::string& error) override; |
| 557 ResponseAction Run() override; | 538 ResponseAction Run() override; |
| 558 }; | 539 }; |
| 559 | 540 |
| 560 } // namespace extensions | 541 } // namespace extensions |
| 561 | 542 |
| 562 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 543 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
| OLD | NEW |