Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 * Javascript for Mojo interface helpers, served from | |
| 7 * chrome://bluetooth-internals/. | |
| 8 */ | |
| 9 | |
| 10 cr.define('interfaces', function() { | |
| 11 /** | |
| 12 * Initializes Mojo proxies for page and Bluetooth services. Adds Mojo | |
|
ortuno
2016/11/04 01:44:09
Fix comment since this is no longer initializing p
mbrunson
2016/11/04 02:37:40
Done.
| |
| 13 * interfaces to window.interfaces. | |
| 14 * @return {Promise} | |
| 15 */ | |
| 16 function initializeProxies() { | |
|
ortuno
2016/11/04 01:44:10
nit: rename this to retrieve interfaces since you
mbrunson
2016/11/04 02:37:40
Done.
| |
| 17 return importModules([ | |
| 18 'content/public/renderer/frame_interfaces', | |
| 19 'device/bluetooth/public/interfaces/adapter.mojom', | |
| 20 'device/bluetooth/public/interfaces/device.mojom', | |
| 21 'mojo/public/js/connection', | |
| 22 ]).then(function([frameInterfaces, bluetoothAdapter, bluetoothDevice, | |
| 23 connection]) { | |
| 24 Object.assign(interfaces, { | |
| 25 BluetoothAdapter: bluetoothAdapter, | |
| 26 BluetoothDevice: bluetoothDevice, | |
| 27 Connection: connection, | |
| 28 FrameInterfaces: frameInterfaces, | |
| 29 }); | |
| 30 }); | |
| 31 } | |
| 32 | |
| 33 return { | |
| 34 initialize: initializeProxies, | |
|
ortuno
2016/11/04 01:44:10
Maybe retrieve since you are no longer initializin
mbrunson
2016/11/04 02:37:40
Done.
| |
| 35 }; | |
| 36 }); | |
| OLD | NEW |