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

Unified Diff: chrome/browser/resources/bluetooth_internals/adapter_broker.js

Issue 2488093003: bluetooth: Componentize device list fixes (Closed)
Patch Set: Combine private and type Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/bluetooth_internals/bluetooth_internals.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/bluetooth_internals/adapter_broker.js
diff --git a/chrome/browser/resources/bluetooth_internals/adapter_broker.js b/chrome/browser/resources/bluetooth_internals/adapter_broker.js
index c17c89fe2a4806ce63a0155d4f5fba024ef10c33..ae9bfaae28d35ebe689de7cc5ff7634a2ce52976 100644
--- a/chrome/browser/resources/bluetooth_internals/adapter_broker.js
+++ b/chrome/browser/resources/bluetooth_internals/adapter_broker.js
@@ -28,7 +28,7 @@ cr.define('adapter_broker', function() {
/**
* Sets client of Adapter service.
- * @param {interfaces.BluetoothAdapter.AdapterClient} adapterClient
+ * @param {!interfaces.BluetoothAdapter.AdapterClient} adapterClient
*/
setClient: function(adapterClient) {
this.adapter_.setClient(interfaces.Connection.bindStubDerivedImpl(
@@ -37,7 +37,7 @@ cr.define('adapter_broker', function() {
/**
* Gets an array of currently detectable devices from the Adapter service.
- * @return {Array<interfaces.BluetoothDevice.DeviceInfo>}
+ * @return {!Array<!interfaces.BluetoothDevice.DeviceInfo>}
*/
getDevices: function() {
return this.adapter_.getDevices();
@@ -45,7 +45,7 @@ cr.define('adapter_broker', function() {
/**
* Gets the current state of the Adapter.
- * @return {interfaces.BluetoothAdapter.AdapterInfo}
+ * @return {!interfaces.BluetoothAdapter.AdapterInfo}
*/
getInfo: function() {
return this.adapter_.getInfo();
@@ -109,15 +109,13 @@ cr.define('adapter_broker', function() {
/**
* Initializes an AdapterBroker if one doesn't exist.
- * @return {Promise<AdapterBroker>} resolves with AdapterBroker,
+ * @return {!Promise<!AdapterBroker>} resolves with AdapterBroker,
* rejects if Bluetooth is not supported.
*/
function getAdapterBroker() {
- if (adapterBroker) {
- return Promise.resolve(adapterBroker);
- }
+ if (adapterBroker) return Promise.resolve(adapterBroker);
- return interfaces.importInterfaces().then(function(adapter) {
+ return interfaces.setupInterfaces().then(function(adapter) {
// Hook up the instance properties.
AdapterClient.prototype.__proto__ =
interfaces.BluetoothAdapter.AdapterClient.stubClass.prototype;
« no previous file with comments | « no previous file | chrome/browser/resources/bluetooth_internals/bluetooth_internals.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698