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

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

Issue 9423049: Make registering custom hooks with schema_generated_bindings.js safer and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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/context_menus_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/context_menus_custom_bindings.js b/chrome/renderer/resources/extensions/context_menus_custom_bindings.js
index 9968122d216b307c0f438caeb943570bde14afd2..e4983e690a254787b5de090031ede23584056d71 100644
--- a/chrome/renderer/resources/extensions/context_menus_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/context_menus_custom_bindings.js
@@ -17,7 +17,7 @@ chromeHidden.registerCustomHook('contextMenus', function(bindingsAPI) {
chromeHidden.contextMenus = {};
chromeHidden.contextMenus.handlers = {};
- var eventName = "contextMenus";
+ var eventName = 'contextMenus';
chromeHidden.contextMenus.event = new chrome.Event(eventName);
chromeHidden.contextMenus.ensureListenerSetup = function() {
if (chromeHidden.contextMenus.listening) {
@@ -35,7 +35,7 @@ chromeHidden.registerCustomHook('contextMenus', function(bindingsAPI) {
});
};
- apiFunctions.setHandleRequest("contextMenus.create", function() {
+ apiFunctions.setHandleRequest('create', function() {
var args = arguments;
var id = GetNextContextMenuId();
args[0].generatedId = id;
@@ -46,8 +46,7 @@ chromeHidden.registerCustomHook('contextMenus', function(bindingsAPI) {
return id;
});
- apiFunctions.setCustomCallback("contextMenus.create",
- function(name, request, response) {
+ apiFunctions.setCustomCallback('create', function(name, request, response) {
if (chrome.extension.lastError) {
return;
}
@@ -62,8 +61,7 @@ chromeHidden.registerCustomHook('contextMenus', function(bindingsAPI) {
}
});
- apiFunctions.setCustomCallback("contextMenus.remove",
- function(name, request, response) {
+ apiFunctions.setCustomCallback('remove', function(name, request, response) {
if (chrome.extension.lastError) {
return;
}
@@ -71,8 +69,7 @@ chromeHidden.registerCustomHook('contextMenus', function(bindingsAPI) {
delete chromeHidden.contextMenus.handlers[id];
});
- apiFunctions.setCustomCallback("contextMenus.update",
- function(name, request, response) {
+ apiFunctions.setCustomCallback('update', function(name, request, response) {
if (chrome.extension.lastError) {
return;
}
@@ -82,8 +79,8 @@ chromeHidden.registerCustomHook('contextMenus', function(bindingsAPI) {
}
});
- apiFunctions.setCustomCallback("contextMenus.removeAll",
- function(name, request, response) {
+ apiFunctions.setCustomCallback('removeAll',
+ function(name, request, response) {
if (chrome.extension.lastError) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698