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

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

Issue 149213003: Cleanup: Fix some lint/style errors in extensions code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 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 | 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 Permissions API. 5 // Custom binding for the Permissions API.
6 6
7 var binding = require('binding').Binding.create('permissions'); 7 var binding = require('binding').Binding.create('permissions');
8 8
9 var Event = require('event_bindings').Event; 9 var Event = require('event_bindings').Event;
10 var sendRequest = require('sendRequest').sendRequest;
11 10
12 // These custom binding are only necessary because it is not currently 11 // These custom binding are only necessary because it is not currently
13 // possible to have a union of types as the type of the items in an array. 12 // possible to have a union of types as the type of the items in an array.
14 // Once that is fixed, this entire file should go away. 13 // Once that is fixed, this entire file should go away.
15 // See, 14 // See,
16 // https://code.google.com/p/chromium/issues/detail?id=162044 15 // https://code.google.com/p/chromium/issues/detail?id=162044
17 // https://code.google.com/p/chromium/issues/detail?id=162042 16 // https://code.google.com/p/chromium/issues/detail?id=162042
18 // TODO(bryeung): delete this file. 17 // TODO(bryeung): delete this file.
19 binding.registerCustomHook(function(api) { 18 binding.registerCustomHook(function(api) {
20 var apiFunctions = api.apiFunctions; 19 var apiFunctions = api.apiFunctions;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 for (var i = 0; i < args[0].permissions.length; i += 1) { 88 for (var i = 0; i < args[0].permissions.length; i += 1) {
90 args[0].permissions[i] = maybeConvertToObject(args[0].permissions[i]); 89 args[0].permissions[i] = maybeConvertToObject(args[0].permissions[i]);
91 } 90 }
92 $Function.call(Event.prototype.dispatchToListener, this, callback, args); 91 $Function.call(Event.prototype.dispatchToListener, this, callback, args);
93 }; 92 };
94 permissions.onRemoved.dispatchToListener = 93 permissions.onRemoved.dispatchToListener =
95 permissions.onAdded.dispatchToListener; 94 permissions.onAdded.dispatchToListener;
96 }); 95 });
97 96
98 exports.binding = binding.generate(); 97 exports.binding = binding.generate();
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/media_galleries_custom_bindings.js ('k') | extensions/browser/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698