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

Unified Diff: chrome/renderer/resources/extensions/tts_engine_custom_bindings.js

Issue 9386001: Implement a module system for the extension bindings JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/tts_engine_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/tts_engine_custom_bindings.js b/chrome/renderer/resources/extensions/tts_engine_custom_bindings.js
index 85e36b083f59408172998d3db5afe1b61170e5a2..7c0067b822e9e1dd97c1a1ce87df52bc751afd8d 100644
--- a/chrome/renderer/resources/extensions/tts_engine_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/tts_engine_custom_bindings.js
@@ -4,11 +4,9 @@
// Custom bindings for the ttsEngine API.
-(function() {
+var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
-native function GetChromeHidden();
-
-GetChromeHidden().registerCustomHook('ttsEngine', function() {
+chromeHidden.registerCustomHook('ttsEngine', function() {
chrome.ttsEngine.onSpeak.dispatch = function(text, options, requestId) {
var sendTtsEvent = function(event) {
chrome.ttsEngine.sendTtsEvent(requestId, event);
@@ -17,5 +15,3 @@ GetChromeHidden().registerCustomHook('ttsEngine', function() {
this, [text, options, sendTtsEvent]);
};
});
-
-})();

Powered by Google App Engine
This is Rietveld 408576698