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

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

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments/TODOs 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/sync_file_system_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/sync_file_system_custom_bindings.js b/chrome/renderer/resources/extensions/sync_file_system_custom_bindings.js
index beae4d05a7484540ba6bc338951347aa82caf998..40a3a61fbe15b812f78aee100f52e4f4882e9fa8 100644
--- a/chrome/renderer/resources/extensions/sync_file_system_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/sync_file_system_custom_bindings.js
@@ -4,10 +4,12 @@
// Custom bindings for the syncFileSystem API.
-var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
+var bindings = new (require('schema_binding_generator').Bindings)(
+ 'syncFileSystem');
+
var syncFileSystemNatives = requireNative('sync_file_system');
-chromeHidden.registerCustomHook('syncFileSystem', function(bindingsAPI) {
+bindings.registerCustomHook('syncFileSystem', function(bindingsAPI) {
var apiFunctions = bindingsAPI.apiFunctions;
// Functions which take in an [instanceOf=FileEntry].
@@ -45,3 +47,5 @@ chromeHidden.registerCustomHook('syncFileSystem', function(bindingsAPI) {
request.callback = null;
});
});
+
+exports.bindings = bindings.generate();

Powered by Google App Engine
This is Rietveld 408576698