Index: device/bluetooth/public/interfaces/bluetooth.mojom |
diff --git a/device/bluetooth/public/interfaces/bluetooth.mojom b/device/bluetooth/public/interfaces/bluetooth.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e6d4126b3ee0b18629d053e34ed86ef4bc02e896 |
--- /dev/null |
+++ b/device/bluetooth/public/interfaces/bluetooth.mojom |
@@ -0,0 +1,35 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+ |
ortuno
2016/09/22 08:32:54
nit: remove new line
mbrunson
2016/09/24 01:05:47
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+module bluetooth; |
ortuno
2016/09/22 08:32:54
scheib: Should we add a note mentioning that this
scheib
2016/09/23 20:53:51
Use:
module bluetooth.mojom
I think we should use
|
+ |
+struct DeviceInfo { |
+ string? name; |
+ string name_for_display; |
+ string id; |
+ string address; |
+ uint16 device_id; |
ortuno
2016/09/22 08:32:54
nit: there was a comment about this on the design
mbrunson
2016/09/24 01:05:47
I think just removing it entirely for now would be
|
+ uint16 product_id; |
+ uint16 vendor_id; |
+}; |
+ |
+interface Adapter { |
scheib
2016/09/23 20:53:51
ortuno: what do you think here,
I think that we sh
mbrunson
2016/09/24 01:05:47
The internals interface was not supposed to be in
ortuno
2016/09/26 01:57:56
Separating in the interfaces in files sounds good.
|
+ // Retrieves the list of devices that can be detected |
ortuno
2016/09/22 08:32:54
I want to get rid of this function but since that
mbrunson
2016/09/24 01:05:47
Done.
|
+ GetDevices(int8 index, int8 count) => (array<DeviceInfo> devices); |
ortuno
2016/09/22 08:32:54
Could you mention the purpose of the two arguments
ortuno
2016/09/22 08:32:54
Could you mention the purpose of the two arguments
mbrunson
2016/09/24 01:05:47
These should probably be removed. The original use
|
+}; |
+ |
+interface AdapterClient { |
+ // Called when a device has been detected |
ortuno
2016/09/22 08:32:54
nit: Called the first time a device is discovered.
mbrunson
2016/09/24 01:05:47
Done.
|
+ DeviceAdded(DeviceInfo device); |
+ |
+ // Called when a device can no longer be detected |
+ DeviceRemoved(DeviceInfo device); |
ortuno
2016/09/22 08:32:54
nit: Called after the device hasn't been seen for
mbrunson
2016/09/24 01:05:47
Done.
|
+}; |
+ |
+interface InternalsPageHandler { |
scheib
2016/09/23 20:53:51
This interface shouldn't be in device/bluetooth
mbrunson
2016/09/24 01:05:47
Done.
|
+ // Creates pipe for Bluetooth Adapter between |client| and |adapter| |
ortuno
2016/09/22 08:32:54
nit: Period at the end of sentence.
mbrunson
2016/09/24 01:05:47
Done.
|
+ GetAdapterService(Adapter& adapter, |
+ AdapterClient client); |
+}; |