OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSION_WEBREQUEST_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBREQUEST_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBREQUEST_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBREQUEST_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 // webRequest API. | 335 // webRequest API. |
336 scoped_ptr<ExtensionWebRequestTimeTracker> request_time_tracker_; | 336 scoped_ptr<ExtensionWebRequestTimeTracker> request_time_tracker_; |
337 | 337 |
338 CallbacksForPageLoad callbacks_for_page_load_; | 338 CallbacksForPageLoad callbacks_for_page_load_; |
339 | 339 |
340 DISALLOW_COPY_AND_ASSIGN(ExtensionWebRequestEventRouter); | 340 DISALLOW_COPY_AND_ASSIGN(ExtensionWebRequestEventRouter); |
341 }; | 341 }; |
342 | 342 |
343 class WebRequestAddEventListener : public SyncIOThreadExtensionFunction { | 343 class WebRequestAddEventListener : public SyncIOThreadExtensionFunction { |
344 public: | 344 public: |
345 virtual bool RunImpl(); | 345 virtual bool RunImpl() OVERRIDE; |
346 DECLARE_EXTENSION_FUNCTION_NAME("experimental.webRequest.addEventListener"); | 346 DECLARE_EXTENSION_FUNCTION_NAME("experimental.webRequest.addEventListener"); |
347 }; | 347 }; |
348 | 348 |
349 class WebRequestEventHandled : public SyncIOThreadExtensionFunction { | 349 class WebRequestEventHandled : public SyncIOThreadExtensionFunction { |
350 public: | 350 public: |
351 virtual bool RunImpl(); | 351 virtual bool RunImpl() OVERRIDE; |
352 DECLARE_EXTENSION_FUNCTION_NAME("experimental.webRequest.eventHandled"); | 352 DECLARE_EXTENSION_FUNCTION_NAME("experimental.webRequest.eventHandled"); |
353 }; | 353 }; |
354 | 354 |
355 class WebRequestHandlerBehaviorChanged : public SyncIOThreadExtensionFunction { | 355 class WebRequestHandlerBehaviorChanged : public SyncIOThreadExtensionFunction { |
356 public: | 356 public: |
357 virtual bool RunImpl(); | 357 virtual bool RunImpl() OVERRIDE; |
358 DECLARE_EXTENSION_FUNCTION_NAME( | 358 DECLARE_EXTENSION_FUNCTION_NAME( |
359 "experimental.webRequest.handlerBehaviorChanged"); | 359 "experimental.webRequest.handlerBehaviorChanged"); |
360 | 360 |
361 private: | 361 private: |
362 virtual void GetQuotaLimitHeuristics( | 362 virtual void GetQuotaLimitHeuristics( |
363 std::list<QuotaLimitHeuristic*>* heuristics) const OVERRIDE; | 363 std::list<QuotaLimitHeuristic*>* heuristics) const OVERRIDE; |
364 // Handle quota exceeded gracefully: Only warn the user but still execute the | 364 // Handle quota exceeded gracefully: Only warn the user but still execute the |
365 // function. | 365 // function. |
366 virtual void OnQuotaExceeded() OVERRIDE; | 366 virtual void OnQuotaExceeded() OVERRIDE; |
367 }; | 367 }; |
368 | 368 |
369 // Send updates to |host| with information about what webRequest-related | 369 // Send updates to |host| with information about what webRequest-related |
370 // extensions are installed. | 370 // extensions are installed. |
371 // TODO(mpcomplete): remove. http://crbug.com/100411 | 371 // TODO(mpcomplete): remove. http://crbug.com/100411 |
372 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); | 372 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); |
373 | 373 |
374 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBREQUEST_API_H_ | 374 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBREQUEST_API_H_ |
OLD | NEW |