Index: extensions/renderer/resources/mojo_private_custom_bindings.js |
diff --git a/extensions/renderer/resources/mojo_private_custom_bindings.js b/extensions/renderer/resources/mojo_private_custom_bindings.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0ba4710e0f3b16a3ede708df977d681b9a7a2e86 |
--- /dev/null |
+++ b/extensions/renderer/resources/mojo_private_custom_bindings.js |
@@ -0,0 +1,19 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+/** |
+ * Custom bindings for the mojoPrivate API. |
+ */ |
+ |
+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
|
+ |
+binding.registerCustomHook(function(bindingsAPI) { |
+ let apiFunctions = bindingsAPI.apiFunctions; |
+ |
+ apiFunctions.setHandleRequest('define', function(name, deps, factory) { |
+ define(name, deps || [], factory); |
+ }); |
+}); |
+ |
+exports.binding = binding.generate(); |