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

Side by Side Diff: chrome/renderer/resources/extensions/web_view/chrome_web_view_internal_custom_bindings.js

Issue 1840453002: [Extensions] More bindings hardening (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 var binding = require('binding').Binding.create('chromeWebViewInternal'); 5 var binding = require('binding').Binding.create('chromeWebViewInternal');
6 var contextMenusHandlers = require('contextMenusHandlers'); 6 var contextMenusHandlers = require('contextMenusHandlers');
7 7
8 binding.registerCustomHook(function(bindingsAPI) { 8 binding.registerCustomHook(function(bindingsAPI) {
9 var apiFunctions = bindingsAPI.apiFunctions; 9 var apiFunctions = bindingsAPI.apiFunctions;
10 10
11 var handlers = contextMenusHandlers.create(true /* isWebview */); 11 var handlers = contextMenusHandlers.create(true /* isWebview */);
12 12
13 apiFunctions.setHandleRequest('contextMenusCreate', 13 apiFunctions.setHandleRequest('contextMenusCreate',
14 handlers.requestHandlers.create); 14 handlers.requestHandlers.create);
15 15
16 apiFunctions.setCustomCallback('contextMenusCreate', 16 apiFunctions.setCustomCallback('contextMenusCreate',
17 handlers.callbacks.create); 17 handlers.callbacks.create);
18 18
19 apiFunctions.setCustomCallback('contextMenusUpdate', 19 apiFunctions.setCustomCallback('contextMenusUpdate',
20 handlers.callbacks.update); 20 handlers.callbacks.update);
21 21
22 apiFunctions.setCustomCallback('contextMenusRemove', 22 apiFunctions.setCustomCallback('contextMenusRemove',
23 handlers.callbacks.remove); 23 handlers.callbacks.remove);
24 24
25 apiFunctions.setCustomCallback('contextMenusRemoveAll', 25 apiFunctions.setCustomCallback('contextMenusRemoveAll',
26 handlers.callbacks.removeAll); 26 handlers.callbacks.removeAll);
27 27
28 }); 28 });
29 29
30 exports.ChromeWebView = binding.generate(); 30 exports.$set('ChromeWebView', binding.generate());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698