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

Side by Side Diff: extensions/renderer/resources/context_menus_handlers.js

Issue 2915813003: [Extensions Bindings] Accept null callbacks while ignoring schema (Closed)
Patch Set: jbroman's Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « extensions/renderer/api_signature_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Implementation of custom bindings for the contextMenus API. 5 // Implementation of custom bindings for the contextMenus API.
6 // This is used to implement the contextMenus API for extensions and for the 6 // This is used to implement the contextMenus API for extensions and for the
7 // <webview> tag (see chrome_web_view_experimental.js). 7 // <webview> tag (see chrome_web_view_experimental.js).
8 8
9 var contextMenuNatives = requireNative('context_menus'); 9 var contextMenuNatives = requireNative('context_menus');
10 var sendRequest = bindingUtil ? 10 var sendRequest = bindingUtil ?
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 var optArgs = { 180 var optArgs = {
181 __proto__: null, 181 __proto__: null,
182 customCallback: getCallback($Function.bind(removeAllCallback, null, 182 customCallback: getCallback($Function.bind(removeAllCallback, null,
183 instanceId)), 183 instanceId)),
184 }; 184 };
185 185
186 var name = isWebview ? 186 var name = isWebview ?
187 'chromeWebViewInternal.contextMenusRemoveAll' : 187 'chromeWebViewInternal.contextMenusRemoveAll' :
188 'contextMenus.removeAll'; 188 'contextMenus.removeAll';
189 sendRequest(name, $Array.from(arguments), 189 sendRequest(name, $Array.from(arguments),
190 this.definition.parameters, optArgs); 190 bindingUtil ? undefined : this.definition.parameters, optArgs);
191 }; 191 };
192 192
193 return { 193 return {
194 requestHandlers: requestHandlers, 194 requestHandlers: requestHandlers,
195 }; 195 };
196 } 196 }
197 197
198 exports.$set('create', createContextMenusHandlers); 198 exports.$set('create', createContextMenusHandlers);
OLDNEW
« no previous file with comments | « extensions/renderer/api_signature_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698