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

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

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more progress Created 7 years, 11 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/tab_capture_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/tab_capture_custom_bindings.js b/chrome/renderer/resources/extensions/tab_capture_custom_bindings.js
index f458a2fbe72825df67f3a7d572e52718a6c9d227..5456167f5fc36fd61582f5b832ff521569ae9b4d 100644
--- a/chrome/renderer/resources/extensions/tab_capture_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/tab_capture_custom_bindings.js
@@ -3,10 +3,11 @@
// found in the LICENSE file.
// Custom bindings for the Tab Capture API.
-var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
-chromeHidden.registerCustomHook('tabCapture',
- function(bindingsAPI, extensionId) {
+var Bindings = require('schema_binding_generator').Bindings;
+var bindings = new Bindings('tabCapture');
+
+bindings.registerCustomHook(function(bindingsAPI, extensionId) {
var apiFunctions = bindingsAPI.apiFunctions;
apiFunctions.setCustomCallback('capture',
@@ -33,3 +34,5 @@ chromeHidden.registerCustomHook('tabCapture',
request.callback = null;
});
});
+
+exports.bindings = bindings.generate();

Powered by Google App Engine
This is Rietveld 408576698