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

Unified Diff: chrome/renderer/resources/extensions/web_request_custom_bindings.js

Issue 10392008: Move declarative API into events API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/web_request_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/web_request_custom_bindings.js b/chrome/renderer/resources/extensions/web_request_custom_bindings.js
index a0e00e85efd2592a34f0f7cd84be2a57f65f0bb6..5a717bf37291f8ccf197666e4ee13bb7c63edcb0 100644
--- a/chrome/renderer/resources/extensions/web_request_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/web_request_custom_bindings.js
@@ -21,7 +21,7 @@ var sendRequest = require('sendRequest').sendRequest;
// callback, {urls: 'http://*.google.com/*'});
// ^ callback will only be called for onBeforeRequests matching the filter.
function WebRequestEvent(eventName, opt_argSchemas, opt_extraArgSchemas,
- opt_eventOptions) {
+ opt_eventOptions, opt_eventsSchema) {
if (typeof eventName != 'string')
throw new Error('chrome.WebRequestEvent requires an event name.');
@@ -32,9 +32,11 @@ function WebRequestEvent(eventName, opt_argSchemas, opt_extraArgSchemas,
this.eventOptions_ = opt_eventOptions ||
{'supportsListeners': true, 'supportsRules': false};
- if (this.eventOptions_.supportsRules)
+ if (this.eventOptions_.supportsRules) {
this.eventForRules_ =
- new chrome.Event(eventName, opt_argSchemas, opt_eventOptions);
+ new chrome.Event(eventName, opt_argSchemas, opt_eventOptions,
+ opt_eventsSchema);
not at google - send to devlin 2012/05/10 09:01:25 nit: 1 line or vertical arguments (I can see that
+ }
};
// Test if the given callback is registered for this event.

Powered by Google App Engine
This is Rietveld 408576698