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

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

Issue 9317072: Allow omitting optional parameters for Extensions API functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved functions to json_schema.js and fixed naming conventions. 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..13a723eabb7ab1409c679c8d39e656953a1656f6 100644
--- a/chrome/renderer/resources/extensions/tabs_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/tabs_custom_bindings.js
@@ -43,26 +43,6 @@ chromeHidden.registerCustomHook('tabs', function(bindingsAPI, extensionId) {
}
});
});
-
- // TODO(skerner,mtytel): The next step to omitting optional arguments is the
- // 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() {
- // Old signature:
- // captureVisibleTab(int windowId, function callback);
- // New signature:
- // captureVisibleTab(int windowId, object details, function callback);
- var newArgs;
- if (arguments.length == 2 && typeof(arguments[1]) == 'function') {
- // If the old signature is used, add a null details object.
- newArgs = [arguments[0], null, arguments[1]];
- } else {
- newArgs = arguments;
- }
- return newArgs;
- });
});
})();

Powered by Google App Engine
This is Rietveld 408576698