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 var Event = require('event_bindings').Event; | 5 var Event = require('event_bindings').Event; |
6 var forEach = require('utils').forEach; | 6 var forEach = require('utils').forEach; |
7 var GetAvailability = requireNative('v8_context').GetAvailability; | 7 var GetAvailability = requireNative('v8_context').GetAvailability; |
8 var logActivity = requireNative('activityLogger'); | 8 var logActivity = requireNative('activityLogger'); |
9 var logging = requireNative('logging'); | 9 var logging = requireNative('logging'); |
10 var process = requireNative('process'); | 10 var process = requireNative('process'); |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 } | 419 } |
420 }); | 420 }); |
421 }; | 421 }; |
422 | 422 |
423 addProperties(mod, schema); | 423 addProperties(mod, schema); |
424 | 424 |
425 var availability = GetAvailability(schema.namespace); | 425 var availability = GetAvailability(schema.namespace); |
426 if (!availability.is_available && $Object.keys(mod).length == 0) { | 426 if (!availability.is_available && $Object.keys(mod).length == 0) { |
427 console.error('chrome.' + schema.namespace + ' is not available: ' + | 427 console.error('chrome.' + schema.namespace + ' is not available: ' + |
428 availability.message); | 428 availability.message); |
| 429 logActivity.LogBlockedCall(extensionId, |
| 430 schema.namespace, |
| 431 availability.result); |
429 return; | 432 return; |
430 } | 433 } |
431 | 434 |
432 this.runHooks_(mod); | 435 this.runHooks_(mod); |
433 return mod; | 436 return mod; |
434 } | 437 } |
435 }; | 438 }; |
436 | 439 |
437 exports.Binding = Binding; | 440 exports.Binding = Binding; |
OLD | NEW |