Chromium Code Reviews| 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, | |
| 236 net::URLRequest* request); | 242 net::URLRequest* request); |
|
mmenke
2016/09/06 17:21:50
Why are we keeping both the old and new versions a
| |
| 237 | 243 |
| 238 // Dispatches the onComplete event. | 244 // Dispatches the onComplete event. |
| 239 void OnCompleted(void* browser_context, | 245 void OnCompleted(void* browser_context, |
| 240 const extensions::InfoMap* extension_info_map, | 246 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, | |
| 241 net::URLRequest* request); | 253 net::URLRequest* request); |
| 242 | 254 |
| 243 // Dispatches an onErrorOccurred event. | 255 // Dispatches an onErrorOccurred event. |
| 244 void OnErrorOccurred(void* browser_context, | 256 void OnErrorOccurred(void* browser_context, |
| 245 const extensions::InfoMap* extension_info_map, | 257 const extensions::InfoMap* extension_info_map, |
| 246 net::URLRequest* request, | 258 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, | |
| 247 bool started); | 266 bool started); |
| 248 | 267 |
| 249 // Notifications when objects are going away. | 268 // Notifications when objects are going away. |
| 250 void OnURLRequestDestroyed(void* browser_context, | 269 void OnURLRequestDestroyed(void* browser_context, |
| 251 const net::URLRequest* request); | 270 const net::URLRequest* request); |
| 252 | 271 |
| 253 // Called when an event listener handles a blocking event and responds. | 272 // Called when an event listener handles a blocking event and responds. |
| 254 void OnEventHandled(void* browser_context, | 273 void OnEventHandled(void* browser_context, |
| 255 const std::string& extension_id, | 274 const std::string& extension_id, |
| 256 const std::string& event_name, | 275 const std::string& event_name, |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 534 extensions::QuotaLimitHeuristics* heuristics) const override; | 553 extensions::QuotaLimitHeuristics* heuristics) const override; |
| 535 // Handle quota exceeded gracefully: Only warn the user but still execute the | 554 // Handle quota exceeded gracefully: Only warn the user but still execute the |
| 536 // function. | 555 // function. |
| 537 void OnQuotaExceeded(const std::string& error) override; | 556 void OnQuotaExceeded(const std::string& error) override; |
| 538 ResponseAction Run() override; | 557 ResponseAction Run() override; |
| 539 }; | 558 }; |
| 540 | 559 |
| 541 } // namespace extensions | 560 } // namespace extensions |
| 542 | 561 |
| 543 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 562 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
| OLD | NEW |