diff options
Diffstat (limited to 'chrome/renderer/resources/extensions/tab_capture_custom_bindings.js')
-rw-r--r-- | chrome/renderer/resources/extensions/tab_capture_custom_bindings.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/renderer/resources/extensions/tab_capture_custom_bindings.js b/chrome/renderer/resources/extensions/tab_capture_custom_bindings.js index f458a2f..a75d36d 100644 --- a/chrome/renderer/resources/extensions/tab_capture_custom_bindings.js +++ b/chrome/renderer/resources/extensions/tab_capture_custom_bindings.js @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Custom bindings for the Tab Capture API. -var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); +// Custom binding for the Tab Capture API. -chromeHidden.registerCustomHook('tabCapture', - function(bindingsAPI, extensionId) { +var binding = require('binding').Binding.create('tabCapture'); + +binding.registerCustomHook(function(bindingsAPI, extensionId) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setCustomCallback('capture', @@ -33,3 +33,5 @@ chromeHidden.registerCustomHook('tabCapture', request.callback = null; }); }); + +exports.binding = binding.generate(); |