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

Unified Diff: chrome/renderer/resources/extensions/tabs_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/tabs_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/tabs_custom_bindings.js b/chrome/renderer/resources/extensions/tabs_custom_bindings.js
index f67f6692b40d5c501d9b7b56a53a3102bf879f1c..cf1061d9d8697715b2f33667c090df6e7757a924 100644
--- a/chrome/renderer/resources/extensions/tabs_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/tabs_custom_bindings.js
@@ -14,7 +14,7 @@ var chromeHidden = GetChromeHidden();
chromeHidden.registerCustomHook('tabs', function(bindingsAPI, extensionId) {
var apiFunctions = bindingsAPI.apiFunctions;
- apiFunctions.setHandleRequest('tabs.connect', function(tabId, connectInfo) {
+ apiFunctions.setHandleRequest('connect', function(tabId, connectInfo) {
var name = '';
if (connectInfo) {
name = connectInfo.name || name;
@@ -23,8 +23,8 @@ chromeHidden.registerCustomHook('tabs', function(bindingsAPI, extensionId) {
return chromeHidden.Port.createPort(portId, name);
});
- apiFunctions.setHandleRequest('tabs.sendRequest',
- function(tabId, request, responseCallback) {
+ apiFunctions.setHandleRequest('sendRequest',
+ function(tabId, request, responseCallback) {
var port = chrome.tabs.connect(tabId,
{name: chromeHidden.kRequestChannel});
port.postMessage(request);
@@ -48,8 +48,7 @@ chromeHidden.registerCustomHook('tabs', function(bindingsAPI, extensionId) {
// replacement of this code with code that matches arguments by type.
// Once this is working for captureVisibleTab() it can be enabled for
// the rest of the API. See crbug/29215 .
- apiFunctions.setUpdateArgumentsPreValidate('tabs.captureVisibleTab',
- function() {
+ apiFunctions.setUpdateArgumentsPreValidate('captureVisibleTab', function() {
// Old signature:
// captureVisibleTab(int windowId, function callback);
// New signature:

Powered by Google App Engine
This is Rietveld 408576698