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

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

Issue 649003003: Add a mojoPrivate API that exposes mojo to component apps/extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@serial-service
Patch Set: Created 5 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 /**
6 * Custom bindings for the mojoPrivate API.
7 */
8
9 let binding = require('binding').Binding.create('mojoPrivate');
not at google - send to devlin 2015/01/16 20:25:14 I was curious about using "let" over "var", and ap
10
11 binding.registerCustomHook(function(bindingsAPI) {
12 let apiFunctions = bindingsAPI.apiFunctions;
13
14 apiFunctions.setHandleRequest('define', function(name, deps, factory) {
15 define(name, deps || [], factory);
16 });
17 });
18
19 exports.binding = binding.generate();
OLDNEW
« no previous file with comments | « extensions/renderer/resources/extensions_renderer_resources.grd ('k') | extensions/test/data/mojo_private_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698