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

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: Don't need this custom binding anymore. 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 f1261b5a6ba2a267584ec6f81411b67a5921a8a9..2dfe8e8f390f634891e3e29d7213ba1f8389b2c5 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) {
}
});
});
-
- // 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