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