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

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

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 10 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 f16f1438e1a7491a3be40a4b22ac7bd902b77c79..215168b80edad63d6ae58189606800b42d9288d0 100644
--- a/chrome/renderer/resources/extensions/tts_engine_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/tts_engine_custom_bindings.js
@@ -2,10 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Custom bindings for the ttsEngine API.
+// Custom binding for the ttsEngine API.
+
+var binding = require('binding').Binding.create('ttsEngine');
var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
+chrome.Event;
chromeHidden.Event.registerArgumentMassager('ttsEngine.onSpeak',
function(args, dispatch) {
var text = args[0];
@@ -16,3 +19,5 @@ chromeHidden.Event.registerArgumentMassager('ttsEngine.onSpeak',
};
dispatch([text, options, sendTtsEvent]);
});
+
+exports.binding = binding.generate();

Powered by Google App Engine
This is Rietveld 408576698