summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/resources/extensions/tts_custom_bindings.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/resources/extensions/tts_custom_bindings.js')
-rw-r--r--chrome/renderer/resources/extensions/tts_custom_bindings.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/renderer/resources/extensions/tts_custom_bindings.js b/chrome/renderer/resources/extensions/tts_custom_bindings.js
index dee01d3..ef8011a 100644
--- a/chrome/renderer/resources/extensions/tts_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/tts_custom_bindings.js
@@ -4,10 +4,12 @@
// Custom bindings for the tts API.
-var ttsNatives = requireNative('tts');
-var GetNextTTSEventId = ttsNatives.GetNextTTSEventId;
+(function() {
-var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
+native function GetChromeHidden();
+native function GetNextTTSEventId();
+
+var chromeHidden = GetChromeHidden();
chromeHidden.registerCustomHook('tts', function(api) {
var apiFunctions = api.apiFunctions;
@@ -40,3 +42,5 @@ chromeHidden.registerCustomHook('tts', function(api) {
return id;
});
});
+
+})();