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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 const BlockedRequest& blocked_request, | 490 const BlockedRequest& blocked_request, |
491 ExtensionNavigationUIData* navigation_ui_data); | 491 ExtensionNavigationUIData* navigation_ui_data); |
492 | 492 |
493 // Called when the RulesRegistry is ready to unblock a request that was | 493 // Called when the RulesRegistry is ready to unblock a request that was |
494 // waiting for said event. | 494 // waiting for said event. |
495 void OnRulesRegistryReady(void* browser_context, | 495 void OnRulesRegistryReady(void* browser_context, |
496 const std::string& event_name, | 496 const std::string& event_name, |
497 uint64_t request_id, | 497 uint64_t request_id, |
498 extensions::RequestStage request_stage); | 498 extensions::RequestStage request_stage); |
499 | 499 |
500 // Returns event details for a given request. | |
501 std::unique_ptr<WebRequestEventDetails> CreateEventDetails( | |
502 const net::URLRequest* request, | |
503 int extra_info_spec); | |
504 | |
505 // Sets the flag that |event_type| has been signaled for |request_id|. | 500 // Sets the flag that |event_type| has been signaled for |request_id|. |
506 // Returns the value of the flag before setting it. | 501 // Returns the value of the flag before setting it. |
507 bool GetAndSetSignaled(uint64_t request_id, EventTypes event_type); | 502 bool GetAndSetSignaled(uint64_t request_id, EventTypes event_type); |
508 | 503 |
509 // Clears the flag that |event_type| has been signaled for |request_id|. | 504 // Clears the flag that |event_type| has been signaled for |request_id|. |
510 void ClearSignaled(uint64_t request_id, EventTypes event_type); | 505 void ClearSignaled(uint64_t request_id, EventTypes event_type); |
511 | 506 |
512 // Returns whether |request| represents a top level window navigation. | 507 // Returns whether |request| represents a top level window navigation. |
513 bool IsPageLoad(const net::URLRequest* request) const; | 508 bool IsPageLoad(const net::URLRequest* request) const; |
514 | 509 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 extensions::QuotaLimitHeuristics* heuristics) const override; | 622 extensions::QuotaLimitHeuristics* heuristics) const override; |
628 // Handle quota exceeded gracefully: Only warn the user but still execute the | 623 // Handle quota exceeded gracefully: Only warn the user but still execute the |
629 // function. | 624 // function. |
630 void OnQuotaExceeded(const std::string& error) override; | 625 void OnQuotaExceeded(const std::string& error) override; |
631 ResponseAction Run() override; | 626 ResponseAction Run() override; |
632 }; | 627 }; |
633 | 628 |
634 } // namespace extensions | 629 } // namespace extensions |
635 | 630 |
636 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 631 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
OLD | NEW |