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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 // Ensures that future callbacks for |request| are ignored so that it can be | 335 // Ensures that future callbacks for |request| are ignored so that it can be |
336 // destroyed safely. | 336 // destroyed safely. |
337 void ClearPendingCallbacks(const net::URLRequest* request); | 337 void ClearPendingCallbacks(const net::URLRequest* request); |
338 | 338 |
339 bool DispatchEvent( | 339 bool DispatchEvent( |
340 void* browser_context, | 340 void* browser_context, |
341 net::URLRequest* request, | 341 net::URLRequest* request, |
342 const std::vector<const EventListener*>& listeners, | 342 const std::vector<const EventListener*>& listeners, |
343 const base::ListValue& args); | 343 const base::ListValue& args); |
344 | 344 |
| 345 void DispatchEventToListeners( |
| 346 void* browser_context, |
| 347 scoped_ptr<std::vector<EventListener>> listeners, |
| 348 base::DictionaryValue* dict, |
| 349 int extension_api_frame_id, |
| 350 int extension_api_parent_frame_id); |
| 351 |
345 // Returns a list of event listeners that care about the given event, based | 352 // Returns a list of event listeners that care about the given event, based |
346 // on their filter parameters. |extra_info_spec| will contain the combined | 353 // on their filter parameters. |extra_info_spec| will contain the combined |
347 // set of extra_info_spec flags that every matching listener asked for. | 354 // set of extra_info_spec flags that every matching listener asked for. |
348 std::vector<const EventListener*> GetMatchingListeners( | 355 std::vector<const EventListener*> GetMatchingListeners( |
349 void* browser_context, | 356 void* browser_context, |
350 const extensions::InfoMap* extension_info_map, | 357 const extensions::InfoMap* extension_info_map, |
351 const std::string& event_name, | 358 const std::string& event_name, |
352 const net::URLRequest* request, | 359 const net::URLRequest* request, |
353 int* extra_info_spec); | 360 int* extra_info_spec); |
354 | 361 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 extensions::QuotaLimitHeuristics* heuristics) const override; | 562 extensions::QuotaLimitHeuristics* heuristics) const override; |
556 // Handle quota exceeded gracefully: Only warn the user but still execute the | 563 // Handle quota exceeded gracefully: Only warn the user but still execute the |
557 // function. | 564 // function. |
558 void OnQuotaExceeded(const std::string& error) override; | 565 void OnQuotaExceeded(const std::string& error) override; |
559 bool RunSync() override; | 566 bool RunSync() override; |
560 }; | 567 }; |
561 | 568 |
562 } // namespace extensions | 569 } // namespace extensions |
563 | 570 |
564 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 571 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
OLD | NEW |