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

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

Issue 1417513003: [Extensions] Don't allow built-in extensions code to be overridden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Jochen's Created 5 years, 1 month 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 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 /** 5 /**
6 * Custom bindings for the mojoPrivate API. 6 * Custom bindings for the mojoPrivate API.
7 */ 7 */
8 8
9 let binding = require('binding').Binding.create('mojoPrivate'); 9 let binding = require('binding').Binding.create('mojoPrivate');
10 10
11 binding.registerCustomHook(function(bindingsAPI) { 11 binding.registerCustomHook(function(bindingsAPI) {
12 let apiFunctions = bindingsAPI.apiFunctions; 12 let apiFunctions = bindingsAPI.apiFunctions;
13 13
14 apiFunctions.setHandleRequest('define', function(name, deps, factory) { 14 apiFunctions.setHandleRequest('define', function(name, deps, factory) {
15 define(name, deps || [], factory); 15 define(name, deps || [], factory);
16 }); 16 });
17 17
18 apiFunctions.setHandleRequest('requireAsync', function(moduleName) { 18 apiFunctions.setHandleRequest('requireAsync', function(moduleName) {
19 return requireAsync(moduleName); 19 return requireAsync(moduleName);
20 }); 20 });
21 }); 21 });
22 22
23 exports.binding = binding.generate(); 23 exports.$set('binding', binding.generate());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698