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 // Custom binding for the contentSettings API. | 5 // Custom binding for the contentSettings API. |
6 | 6 |
7 var sendRequest = require('sendRequest').sendRequest; | 7 var sendRequest = require('sendRequest').sendRequest; |
8 var validate = require('schemaUtils').validate; | 8 var validate = require('schemaUtils').validate; |
9 | 9 |
10 function extendSchema(schema) { | 10 function extendSchema(schema) { |
(...skipping 30 matching lines...) Expand all Loading... |
41 var schema = | 41 var schema = |
42 this.functionSchemas.getResourceIdentifiers.definition.parameters; | 42 this.functionSchemas.getResourceIdentifiers.definition.parameters; |
43 validate([callback], schema); | 43 validate([callback], schema); |
44 return sendRequest( | 44 return sendRequest( |
45 'contentSettings.getResourceIdentifiers', | 45 'contentSettings.getResourceIdentifiers', |
46 [contentType, callback], | 46 [contentType, callback], |
47 extendSchema(schema)); | 47 extendSchema(schema)); |
48 }; | 48 }; |
49 } | 49 } |
50 | 50 |
51 exports.ContentSetting = ContentSetting; | 51 exports.$set('ContentSetting', ContentSetting); |
OLD | NEW |