tree: 0224e8562dffb8fa2abb242882f5b7b1b510cffc [path history] [tgz]
  1. android/
  2. bluez/
  3. dbus/
  4. public/
  5. strings/
  6. test/
  7. uribeacon/
  8. adapter.cc
  9. adapter.h
  10. adapter_factory.cc
  11. adapter_factory.h
  12. bluetooth_adapter.cc
  13. bluetooth_adapter.h
  14. bluetooth_adapter_android.cc
  15. bluetooth_adapter_android.h
  16. bluetooth_adapter_factory.cc
  17. bluetooth_adapter_factory.h
  18. bluetooth_adapter_factory_wrapper.cc
  19. bluetooth_adapter_factory_wrapper.h
  20. bluetooth_adapter_mac.h
  21. bluetooth_adapter_mac.mm
  22. bluetooth_adapter_mac_metrics.h
  23. bluetooth_adapter_mac_metrics.mm
  24. bluetooth_adapter_mac_unittest.mm
  25. bluetooth_adapter_stub.cc
  26. bluetooth_adapter_unittest.cc
  27. bluetooth_adapter_win.cc
  28. bluetooth_adapter_win.h
  29. bluetooth_adapter_win_unittest.cc
  30. bluetooth_advertisement.cc
  31. bluetooth_advertisement.h
  32. bluetooth_advertisement_unittest.cc
  33. bluetooth_channel_mac.h
  34. bluetooth_channel_mac.mm
  35. bluetooth_classic_device_mac.h
  36. bluetooth_classic_device_mac.mm
  37. bluetooth_classic_win.cc
  38. bluetooth_classic_win.h
  39. bluetooth_classic_win_fake.cc
  40. bluetooth_classic_win_fake.h
  41. bluetooth_common.h
  42. bluetooth_device.cc
  43. bluetooth_device.h
  44. bluetooth_device_android.cc
  45. bluetooth_device_android.h
  46. bluetooth_device_mac.h
  47. bluetooth_device_mac.mm
  48. bluetooth_device_unittest.cc
  49. bluetooth_device_win.cc
  50. bluetooth_device_win.h
  51. bluetooth_device_win_unittest.cc
  52. bluetooth_discovery_filter.cc
  53. bluetooth_discovery_filter.h
  54. bluetooth_discovery_filter_unittest.cc
  55. bluetooth_discovery_manager_mac.h
  56. bluetooth_discovery_manager_mac.mm
  57. bluetooth_discovery_session.cc
  58. bluetooth_discovery_session.h
  59. bluetooth_discovery_session_outcome.h
  60. bluetooth_export.h
  61. bluetooth_gatt_characteristic.cc
  62. bluetooth_gatt_characteristic.h
  63. bluetooth_gatt_connection.cc
  64. bluetooth_gatt_connection.h
  65. bluetooth_gatt_descriptor.cc
  66. bluetooth_gatt_descriptor.h
  67. bluetooth_gatt_notify_session.cc
  68. bluetooth_gatt_notify_session.h
  69. bluetooth_gatt_service.cc
  70. bluetooth_gatt_service.h
  71. bluetooth_init_win.cc
  72. bluetooth_init_win.h
  73. bluetooth_l2cap_channel_mac.h
  74. bluetooth_l2cap_channel_mac.mm
  75. bluetooth_local_gatt_characteristic.cc
  76. bluetooth_local_gatt_characteristic.h
  77. bluetooth_local_gatt_characteristic_unittest.cc
  78. bluetooth_local_gatt_descriptor.cc
  79. bluetooth_local_gatt_descriptor.h
  80. bluetooth_local_gatt_descriptor_unittest.cc
  81. bluetooth_local_gatt_service.cc
  82. bluetooth_local_gatt_service.h
  83. bluetooth_local_gatt_service_unittest.cc
  84. bluetooth_low_energy_central_manager_delegate.h
  85. bluetooth_low_energy_central_manager_delegate.mm
  86. bluetooth_low_energy_defs_win.cc
  87. bluetooth_low_energy_defs_win.h
  88. bluetooth_low_energy_device_mac.h
  89. bluetooth_low_energy_device_mac.mm
  90. bluetooth_low_energy_discovery_manager_mac.h
  91. bluetooth_low_energy_discovery_manager_mac.mm
  92. bluetooth_low_energy_peripheral_delegate.h
  93. bluetooth_low_energy_peripheral_delegate.mm
  94. bluetooth_low_energy_win.cc
  95. bluetooth_low_energy_win.h
  96. bluetooth_low_energy_win_fake.cc
  97. bluetooth_low_energy_win_fake.h
  98. bluetooth_low_energy_win_unittest.cc
  99. bluetooth_remote_gatt_characteristic.cc
  100. bluetooth_remote_gatt_characteristic.h
  101. bluetooth_remote_gatt_characteristic_android.cc
  102. bluetooth_remote_gatt_characteristic_android.h
  103. bluetooth_remote_gatt_characteristic_mac.h
  104. bluetooth_remote_gatt_characteristic_mac.mm
  105. bluetooth_remote_gatt_characteristic_unittest.cc
  106. bluetooth_remote_gatt_characteristic_win.cc
  107. bluetooth_remote_gatt_characteristic_win.h
  108. bluetooth_remote_gatt_descriptor.cc
  109. bluetooth_remote_gatt_descriptor.h
  110. bluetooth_remote_gatt_descriptor_android.cc
  111. bluetooth_remote_gatt_descriptor_android.h
  112. bluetooth_remote_gatt_descriptor_mac.h
  113. bluetooth_remote_gatt_descriptor_mac.mm
  114. bluetooth_remote_gatt_descriptor_unittest.cc
  115. bluetooth_remote_gatt_descriptor_win.cc
  116. bluetooth_remote_gatt_descriptor_win.h
  117. bluetooth_remote_gatt_service.cc
  118. bluetooth_remote_gatt_service.h
  119. bluetooth_remote_gatt_service_android.cc
  120. bluetooth_remote_gatt_service_android.h
  121. bluetooth_remote_gatt_service_mac.h
  122. bluetooth_remote_gatt_service_mac.mm
  123. bluetooth_remote_gatt_service_unittest.cc
  124. bluetooth_remote_gatt_service_win.cc
  125. bluetooth_remote_gatt_service_win.h
  126. bluetooth_rfcomm_channel_mac.h
  127. bluetooth_rfcomm_channel_mac.mm
  128. bluetooth_service_record_win.cc
  129. bluetooth_service_record_win.h
  130. bluetooth_service_record_win_unittest.cc
  131. bluetooth_socket.cc
  132. bluetooth_socket.h
  133. bluetooth_socket_mac.h
  134. bluetooth_socket_mac.mm
  135. bluetooth_socket_net.cc
  136. bluetooth_socket_net.h
  137. bluetooth_socket_thread.cc
  138. bluetooth_socket_thread.h
  139. bluetooth_socket_win.cc
  140. bluetooth_socket_win.h
  141. bluetooth_strings.grd
  142. bluetooth_task_manager_win.cc
  143. bluetooth_task_manager_win.h
  144. bluetooth_task_manager_win_unittest.cc
  145. bluetooth_uuid.cc
  146. bluetooth_uuid.h
  147. bluetooth_uuid_unittest.cc
  148. BUILD.gn
  149. DEPS
  150. device.cc
  151. device.h
  152. device_unittest.cc
  153. discovery_session.cc
  154. discovery_session.h
  155. OWNERS
  156. README.md
  157. string_util_icu.cc
  158. string_util_icu.h
  159. string_util_icu_unittest.cc
device/bluetooth/README.md

Bluetooth

device/bluetooth abstracts Bluetooth Classic and Low Energy features across multiple platforms.

Classic and Low Energy based profiles differ substantially. Platform implementations may support only one or the other, even though several classes have interfaces for both, e.g. BluetoothAdapter & BluetoothDevice.

ClassicLow Energy
Androidnoyes
Chrome OSyesyes
Linuxyesyes
Macyesyes
Windowssomenearly

Chrome OS and Linux are supported via BlueZ, see *_bluez files.

Mojo interfaces in public/interfaces have been started but are not ready for production use.

Maintainer History

Initial implementation OWNERS were youngki@chromium.org, keybuk@chromium.org, armansito@chromium.org, and rpaquay@chromium.org. They no longer contribute to chromium fulltime. They were responsible for support for Chrome OS Bluetooth features and the Chrome Apps APIs:

Active development in 2015 & 2016 is focused on enabling GATT features for:

Known future work is tracked in the Refactoring meta issue.

Android

The android implementation requires crossing from C++ to Java using JNI.

Object ownership is rooted in the C++ classes, starting with the Adapter, which owns Devices, Services, etc. Java counter parts interface with the Android Bluetooth objects. E.g.

For testing, the Android objects are wrapped in: android/java/src/org/chromium/device/bluetooth/Wrappers.java.
and fakes implemented in: test/android/java/src/org/chromium/device/bluetooth/Fakes.java.

Thus:

  • bluetooth_adapter_android.h owns:
    • android/.../ChromeBluetoothAdapter.java uses:
      • android/.../Wrappers.java: BluetoothAdapterWrapper
        • Which under test is a FakeBluetoothAdapter
    • bluetooth_device_android.h owns:
      • android/.../ChromeBluetoothDevice.java uses:
        • android/.../Wrappers.java: BluetoothDeviceWrapper
          • Which under test is a FakeBluetoothDevice
      • bluetooth_gatt_service_android.h owns:
        • android/.../ChromeBluetoothService.java uses:
          • android/.../Wrappers.java: BluetoothServiceWrapper
            • Which under test is a FakeBluetoothService
        • ... and so on for characteristics and descriptors.

Fake objects are controlled by bluetooth_test_android.cc.

See also: Class Diagram of Web Bluetooth through Bluetooth Android

Testing

See test/README.md

Design Documents

  • Bluetooth Notifications 2016-08-26
    • Web Bluetooth through Android implementation details, class diagram and call flow.