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

Side by Side Diff: chrome/browser/resources/bluetooth_internals/interfaces.js

Issue 2600683002: Run tools/clang-format-js on some of chrome/browser/resources/ (Closed)
Patch Set: . Created 3 years, 12 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 2016 The Chromium Authors. All rights reserved. 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 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 * Javascript for Mojo interface helpers, served from 6 * Javascript for Mojo interface helpers, served from
7 * chrome://bluetooth-internals/. 7 * chrome://bluetooth-internals/.
8 */ 8 */
9 9
10 cr.define('interfaces', function() { 10 cr.define('interfaces', function() {
11 /** 11 /**
12 * Overriden by tests to give them a chance to setup a fake Mojo browser proxy 12 * Overriden by tests to give them a chance to setup a fake Mojo browser proxy
13 * before any other code executes. 13 * before any other code executes.
14 * @return {!Promise} A promise firing once necessary setup has been completed. 14 * @return {!Promise} A promise firing once necessary setup has been completed.
15 */ 15 */
16 var setupFn = window.setupFn || function() { return Promise.resolve(); }; 16 var setupFn = window.setupFn || function() {
17 return Promise.resolve();
18 };
17 19
18 /** 20 /**
19 * Sets up Mojo interfaces and adds them to window.interfaces. 21 * Sets up Mojo interfaces and adds them to window.interfaces.
20 * @return {Promise} 22 * @return {Promise}
21 */ 23 */
22 function setupInterfaces() { 24 function setupInterfaces() {
23 return setupFn().then(function() { 25 return setupFn().then(function() {
24 return importModules([ 26 return importModules([
25 'content/public/renderer/frame_interfaces', 27 'content/public/renderer/frame_interfaces',
26 'device/bluetooth/public/interfaces/adapter.mojom', 28 'device/bluetooth/public/interfaces/adapter.mojom',
27 'device/bluetooth/public/interfaces/device.mojom', 29 'device/bluetooth/public/interfaces/device.mojom',
28 'mojo/public/js/bindings', 30 'mojo/public/js/bindings',
29 ]).then(function([frameInterfaces, bluetoothAdapter, bluetoothDevice, 31 ])
dschuyler 2016/12/23 01:24:17 Is this aligning to the 'i' in importModules? It l
Dan Beam 2016/12/23 01:30:40 i'm fairly sure . is being moved to the next line,
dschuyler 2016/12/23 01:49:13 Sorry, I mean the code above on lines 27 to 31 - t
Dan Beam 2016/12/23 01:50:06 do you know a .clang-format option that would chan
30 bindings]) { 32 .then(function(
31 interfaces.BluetoothAdapter = bluetoothAdapter; 33 [frameInterfaces, bluetoothAdapter, bluetoothDevice, bindings]) {
32 interfaces.BluetoothDevice = bluetoothDevice; 34 interfaces.BluetoothAdapter = bluetoothAdapter;
33 interfaces.Bindings = bindings; 35 interfaces.BluetoothDevice = bluetoothDevice;
34 interfaces.FrameInterfaces = frameInterfaces; 36 interfaces.Bindings = bindings;
35 }); 37 interfaces.FrameInterfaces = frameInterfaces;
38 });
36 }); 39 });
37 } 40 }
38 41
39 return { 42 return {
40 setupInterfaces: setupInterfaces, 43 setupInterfaces: setupInterfaces,
41 }; 44 };
42 }); 45 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698