|
Bluetooth: clean up Bluetooth classes
The abstract BluetoothDevice class has a few problems inherited from
its origin as a ChromeOS-specific class split between implementation
and platform-specific components.
Clean those problems up, specifically:
- replace bluetooth_class_, name_ and address_ non-abstract members
with getter functions that the platform should implement.
- also make IsConnected(), IsConnectable() and IsConnecting()
abstract functions rather than providing an implementation
- remove IsVisible() which was a CrOS-specific hack
- remove IsBonded(), use IsPaired() instead
- remove service_uuids_ non-abstract member; make GetServices return
a copy of the list to allow implementations to fetch it on demand
BluetoothDevice retains implementations for GetName(), GetDisplayType()
and ProvidesServiceWithUUID() since those can be implemented entirely
using platform-provided information functions and would be identical
in each platform.
Also rename BluetoothAdapter::address() and BluetoothAdapter::name() to
GetAddress() and GetName() to match since they are also pure virtual.
BUG=none
TEST=device_unittests, browser_tests, unit_tests
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192474
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+344 lines, -230 lines) |
Patch |
 |
M |
ash/system/bluetooth/tray_bluetooth.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ash/system/tray/system_tray_delegate.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/system/ash_system_tray_delegate.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc
|
View
|
1
2
3
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc
|
View
|
1
2
3
|
9 chunks |
+18 lines, -18 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc
|
View
|
1
2
3
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/resources/chromeos/browser_options.js
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/resources/options/browser_options.js
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/resources/options/chromeos/bluetooth_device_list.js
|
View
|
|
3 chunks |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
|
View
|
1
2
3
|
4 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/common/extensions/api/bluetooth.idl
|
View
|
|
2 chunks |
+1 line, -6 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter.h
|
View
|
1
2
3
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter_chromeos.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter_chromeos.cc
|
View
|
1
2
3
|
6 chunks |
+17 lines, -15 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter_chromeos_unittest.cc
|
View
|
1
2
3
|
6 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter_devices_chromeos_unittest.cc
|
View
|
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter_experimental_chromeos.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter_experimental_chromeos.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter_mac.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter_mac.mm
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter_win.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_adapter_win.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_device.h
|
View
|
1
2
3
|
5 chunks |
+14 lines, -46 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_device.cc
|
View
|
1
2
3
|
5 chunks |
+27 lines, -53 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_device_chromeos.h
|
View
|
1
2
3
|
3 chunks |
+47 lines, -6 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_device_chromeos.cc
|
View
|
1
2
3
|
7 chunks |
+36 lines, -9 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_device_mac.h
|
View
|
1
2
3
|
3 chunks |
+28 lines, -1 line |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_device_mac.mm
|
View
|
1
2
3
|
2 chunks |
+27 lines, -4 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_device_win.h
|
View
|
1
2
3
4
5
|
3 chunks |
+36 lines, -3 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_device_win.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+27 lines, -2 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/bluetooth_device_win_unittest.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
device/bluetooth/test/mock_bluetooth_adapter.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/test/mock_bluetooth_device.h
|
View
|
1
2
3
|
2 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
 |
M |
device/bluetooth/test/mock_bluetooth_device.cc
|
View
|
1
2
3
|
2 chunks |
+15 lines, -8 lines |
0 comments
|
Download
|
Total messages: 17 (0 generated)
|