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

Unified Diff: chrome/renderer/resources/extensions/experimental.offscreenTabs_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/experimental.offscreenTabs_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/experimental.offscreenTabs_custom_bindings.js b/chrome/renderer/resources/extensions/experimental.offscreenTabs_custom_bindings.js
index 3635a2c6d90ceb2e5a56a5431fa9af9be1213c11..7903a3d3d8b5930f101167adf6ba4550c703747a 100644
--- a/chrome/renderer/resources/extensions/experimental.offscreenTabs_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/experimental.offscreenTabs_custom_bindings.js
@@ -2,13 +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 experimental offscreenTabs API.
+// Custom binding for the experimental offscreenTabs API.
-(function() {
+var binding = require('binding').Binding.create('experimental.offscreenTabs');
-native function GetChromeHidden();
-
-GetChromeHidden().registerCustomHook(
+binding.registerCustomHook(
'experimental.offscreenTabs', function(api) {
var apiFunctions = api.apiFunctions;
@@ -60,4 +58,4 @@ GetChromeHidden().registerCustomHook(
function() { return validate(arguments, mouseEventFilter); });
});
-})();
+exports.binding = binding.generate();

Powered by Google App Engine
This is Rietveld 408576698