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

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: android compilation Created 7 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/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..a75d36df3daf310ab57da4e16b8454119415d70a 100644
--- a/chrome/renderer/resources/extensions/tab_capture_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/tab_capture_custom_bindings.js
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Custom bindings for the Tab Capture API.
-var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
+// Custom binding for the Tab Capture API.
-chromeHidden.registerCustomHook('tabCapture',
- function(bindingsAPI, extensionId) {
+var binding = require('binding').Binding.create('tabCapture');
+
+binding.registerCustomHook(function(bindingsAPI, extensionId) {
var apiFunctions = bindingsAPI.apiFunctions;
apiFunctions.setCustomCallback('capture',
@@ -33,3 +33,5 @@ chromeHidden.registerCustomHook('tabCapture',
request.callback = null;
});
});
+
+exports.binding = binding.generate();

Powered by Google App Engine
This is Rietveld 408576698