Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: extensions/browser/api/web_request/web_request_api.h

Issue 2449913002: Support WebSocket in WebRequest API. (Closed)
Patch Set: Fix unittest; add 'websocket' type to WebRequest API. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 const BlockedRequest& blocked_request, 489 const BlockedRequest& blocked_request,
490 ExtensionNavigationUIData* navigation_ui_data); 490 ExtensionNavigationUIData* navigation_ui_data);
491 491
492 // Called when the RulesRegistry is ready to unblock a request that was 492 // Called when the RulesRegistry is ready to unblock a request that was
493 // waiting for said event. 493 // waiting for said event.
494 void OnRulesRegistryReady(void* browser_context, 494 void OnRulesRegistryReady(void* browser_context,
495 const std::string& event_name, 495 const std::string& event_name,
496 uint64_t request_id, 496 uint64_t request_id,
497 extensions::RequestStage request_stage); 497 extensions::RequestStage request_stage);
498 498
499 // Returns event details for a given request.
500 std::unique_ptr<WebRequestEventDetails> CreateEventDetails(
501 const net::URLRequest* request,
502 int extra_info_spec);
503
504 // Sets the flag that |event_type| has been signaled for |request_id|. 499 // Sets the flag that |event_type| has been signaled for |request_id|.
505 // Returns the value of the flag before setting it. 500 // Returns the value of the flag before setting it.
506 bool GetAndSetSignaled(uint64_t request_id, EventTypes event_type); 501 bool GetAndSetSignaled(uint64_t request_id, EventTypes event_type);
507 502
508 // Clears the flag that |event_type| has been signaled for |request_id|. 503 // Clears the flag that |event_type| has been signaled for |request_id|.
509 void ClearSignaled(uint64_t request_id, EventTypes event_type); 504 void ClearSignaled(uint64_t request_id, EventTypes event_type);
510 505
511 // Returns whether |request| represents a top level window navigation. 506 // Returns whether |request| represents a top level window navigation.
512 bool IsPageLoad(const net::URLRequest* request) const; 507 bool IsPageLoad(const net::URLRequest* request) const;
513 508
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 extensions::QuotaLimitHeuristics* heuristics) const override; 621 extensions::QuotaLimitHeuristics* heuristics) const override;
627 // Handle quota exceeded gracefully: Only warn the user but still execute the 622 // Handle quota exceeded gracefully: Only warn the user but still execute the
628 // function. 623 // function.
629 void OnQuotaExceeded(const std::string& error) override; 624 void OnQuotaExceeded(const std::string& error) override;
630 ResponseAction Run() override; 625 ResponseAction Run() override;
631 }; 626 };
632 627
633 } // namespace extensions 628 } // namespace extensions
634 629
635 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ 630 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698