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

Side by Side Diff: chrome/renderer/resources/extensions/web_request_custom_bindings.js

Issue 12517011: Added activity logging for ext APIs with custom bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified setHandleRequest to avoid double logging Created 7 years, 9 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 | Annotate | Revision Log
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 // Custom binding for the webRequest API. 5 // Custom binding for the webRequest API.
6 6
7 var binding = require('binding').Binding.create('webRequest'); 7 var binding = require('binding').Binding.create('webRequest');
8 8
9 var webRequestNatives = requireNative('web_request'); 9 var webRequestNatives = requireNative('web_request');
10 var GetUniqueSubEventName = webRequestNatives.GetUniqueSubEventName; 10 var GetUniqueSubEventName = webRequestNatives.GetUniqueSubEventName;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 binding.registerCustomEvent(WebRequestEvent); 155 binding.registerCustomEvent(WebRequestEvent);
156 156
157 binding.registerCustomHook(function(api) { 157 binding.registerCustomHook(function(api) {
158 var apiFunctions = api.apiFunctions; 158 var apiFunctions = api.apiFunctions;
159 159
160 apiFunctions.setHandleRequest('handlerBehaviorChanged', function() { 160 apiFunctions.setHandleRequest('handlerBehaviorChanged', function() {
161 var args = Array.prototype.slice.call(arguments); 161 var args = Array.prototype.slice.call(arguments);
162 sendRequest(this.name, args, this.definition.parameters, 162 sendRequest(this.name, args, this.definition.parameters,
163 {forIOThread: true}); 163 {forIOThread: true});
164 }); 164 }, true);
165 }); 165 });
166 166
167 exports.binding = binding.generate(); 167 exports.binding = binding.generate();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698