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

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

Issue 12313142: Revert 184837 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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/notification_custom_bindings.js
===================================================================
--- chrome/renderer/resources/extensions/notification_custom_bindings.js (revision 184858)
+++ chrome/renderer/resources/extensions/notification_custom_bindings.js (working copy)
@@ -4,12 +4,10 @@
// Custom bindings for the notification API.
-var binding = require('binding').Binding.create('experimental.notification');
-
+var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
var sendRequest = require('sendRequest').sendRequest;
var imageUtil = require('imageUtil');
var lastError = require('lastError');
-var json = require('json');
function url_getter(context, key) {
var f = function() {
@@ -101,8 +99,8 @@
return function(id, input_notification_details, callback) {
// TODO(dewittj): Remove this hack. This is used as a way to deep
// copy a complex JSON object.
- var notification_details = json.parse(
- json.stringify(input_notification_details));
+ var notification_details = JSON.parse(
+ JSON.stringify(input_notification_details));
var that = this;
replaceNotificationOptionURLs(notification_details, function(success) {
if (success) {
@@ -126,6 +124,5 @@
apiFunctions.setHandleRequest('update', handleCreate);
};
-binding.registerCustomHook(experimentalNotificationCustomHook);
-
-exports.binding = binding.generate();
+chromeHidden.registerCustomHook('experimental.notification',
+ experimentalNotificationCustomHook);

Powered by Google App Engine
This is Rietveld 408576698