| 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 CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 // Returns whether |request| represents a top level window navigation. | 364 // Returns whether |request| represents a top level window navigation. |
| 365 bool IsPageLoad(net::URLRequest* request) const; | 365 bool IsPageLoad(net::URLRequest* request) const; |
| 366 | 366 |
| 367 // Called on a page load to process all registered callbacks. | 367 // Called on a page load to process all registered callbacks. |
| 368 void NotifyPageLoad(); | 368 void NotifyPageLoad(); |
| 369 | 369 |
| 370 // Returns the matching cross profile (the regular profile if |profile| is | 370 // Returns the matching cross profile (the regular profile if |profile| is |
| 371 // OTR and vice versa). | 371 // OTR and vice versa). |
| 372 void* GetCrossProfile(void* profile) const; | 372 void* GetCrossProfile(void* profile) const; |
| 373 | 373 |
| 374 // Returns true if |request| was already signaled to some event handlers. |
| 375 bool WasSignaled(const net::URLRequest& request) const; |
| 376 |
| 374 // A map for each profile that maps an event name to a set of extensions that | 377 // A map for each profile that maps an event name to a set of extensions that |
| 375 // are listening to that event. | 378 // are listening to that event. |
| 376 ListenerMap listeners_; | 379 ListenerMap listeners_; |
| 377 | 380 |
| 378 // A map of network requests that are waiting for at least one event handler | 381 // A map of network requests that are waiting for at least one event handler |
| 379 // to respond. | 382 // to respond. |
| 380 BlockedRequestMap blocked_requests_; | 383 BlockedRequestMap blocked_requests_; |
| 381 | 384 |
| 382 // A map of request ids to a bitvector indicating which events have been | 385 // A map of request ids to a bitvector indicating which events have been |
| 383 // signaled and should not be sent again. | 386 // signaled and should not be sent again. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 virtual void OnQuotaExceeded() OVERRIDE; | 440 virtual void OnQuotaExceeded() OVERRIDE; |
| 438 virtual bool RunImpl() OVERRIDE; | 441 virtual bool RunImpl() OVERRIDE; |
| 439 }; | 442 }; |
| 440 | 443 |
| 441 // Send updates to |host| with information about what webRequest-related | 444 // Send updates to |host| with information about what webRequest-related |
| 442 // extensions are installed. | 445 // extensions are installed. |
| 443 // TODO(mpcomplete): remove. http://crbug.com/100411 | 446 // TODO(mpcomplete): remove. http://crbug.com/100411 |
| 444 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); | 447 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); |
| 445 | 448 |
| 446 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 449 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
| OLD | NEW |