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

Unified Diff: chrome/renderer/resources/extensions/notifications_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/notifications_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/notifications_custom_bindings.js b/chrome/renderer/resources/extensions/notifications_custom_bindings.js
index 3584f367e02e1d29275b821653612b7dd87ca523..d1dd6faad543e9a2679f03cf36a736444bd9a38a 100644
--- a/chrome/renderer/resources/extensions/notifications_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/notifications_custom_bindings.js
@@ -3,8 +3,8 @@
// found in the LICENSE file.
// Custom bindings for the notifications API.
+var binding = require('binding').Binding.create('notifications');
-var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
var sendRequest = require('sendRequest').sendRequest;
var imageUtil = require('imageUtil');
var lastError = require('lastError');
@@ -109,8 +109,8 @@ function genHandle(failure_function) {
that.definition.parameters);
return;
}
- lastError.set('Unable to download all specified images.');
- failure_function(callback, id);
+ lastError.run('Unable to download all specified images.',
+ failure_function, [callback, id])
});
};
}
@@ -124,4 +124,6 @@ var notificationsCustomHook = function(bindingsAPI, extensionId) {
apiFunctions.setHandleRequest('update', handleCreate);
};
-chromeHidden.registerCustomHook('notifications', notificationsCustomHook);
+binding.registerCustomHook(notificationsCustomHook);
+
+exports.binding = binding.generate();

Powered by Google App Engine
This is Rietveld 408576698