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

Side by Side Diff: components/arc/bluetooth/arc_bluetooth_bridge.h

Issue 1898643002: Refactor device::BluetoothGattXXX classes to split into remote/local. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 #ifndef COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_ 5 #ifndef COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_
6 #define COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_ 6 #define COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "components/arc/arc_bridge_service.h" 13 #include "components/arc/arc_bridge_service.h"
14 #include "components/arc/arc_service.h" 14 #include "components/arc/arc_service.h"
15 #include "components/arc/common/bluetooth.mojom.h" 15 #include "components/arc/common/bluetooth.mojom.h"
16 #include "device/bluetooth/bluetooth_adapter.h" 16 #include "device/bluetooth/bluetooth_adapter.h"
17 #include "device/bluetooth/bluetooth_adapter_factory.h" 17 #include "device/bluetooth/bluetooth_adapter_factory.h"
18 #include "device/bluetooth/bluetooth_device.h" 18 #include "device/bluetooth/bluetooth_device.h"
19 #include "device/bluetooth/bluetooth_discovery_session.h" 19 #include "device/bluetooth/bluetooth_discovery_session.h"
20 #include "device/bluetooth/bluetooth_gatt_characteristic.h" 20 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h"
21 #include "device/bluetooth/bluetooth_gatt_descriptor.h" 21 #include "device/bluetooth/bluetooth_remote_gatt_descriptor.h"
22 #include "device/bluetooth/bluetooth_gatt_service.h" 22 #include "device/bluetooth/bluetooth_remote_gatt_service.h"
23 #include "mojo/public/cpp/bindings/binding.h" 23 #include "mojo/public/cpp/bindings/binding.h"
24 24
25 namespace arc { 25 namespace arc {
26 26
27 class ArcBridgeService; 27 class ArcBridgeService;
28 28
29 class ArcBluetoothBridge 29 class ArcBluetoothBridge
30 : public ArcService, 30 : public ArcService,
31 public ArcBridgeService::Observer, 31 public ArcBridgeService::Observer,
32 public device::BluetoothAdapter::Observer, 32 public device::BluetoothAdapter::Observer,
(...skipping 27 matching lines...) Expand all
60 60
61 void DevicePairedChanged(device::BluetoothAdapter* adapter, 61 void DevicePairedChanged(device::BluetoothAdapter* adapter,
62 device::BluetoothDevice* device, 62 device::BluetoothDevice* device,
63 bool new_paired_status) override; 63 bool new_paired_status) override;
64 64
65 void DeviceRemoved(device::BluetoothAdapter* adapter, 65 void DeviceRemoved(device::BluetoothAdapter* adapter,
66 device::BluetoothDevice* device) override; 66 device::BluetoothDevice* device) override;
67 67
68 void GattServiceAdded(device::BluetoothAdapter* adapter, 68 void GattServiceAdded(device::BluetoothAdapter* adapter,
69 device::BluetoothDevice* device, 69 device::BluetoothDevice* device,
70 device::BluetoothGattService* service) override; 70 device::BluetoothRemoteGattService* service) override;
71 71
72 void GattServiceRemoved(device::BluetoothAdapter* adapter, 72 void GattServiceRemoved(device::BluetoothAdapter* adapter,
73 device::BluetoothDevice* device, 73 device::BluetoothDevice* device,
74 device::BluetoothGattService* service) override; 74 device::BluetoothRemoteGattService* service) override;
75 75
76 void GattServicesDiscovered(device::BluetoothAdapter* adapter, 76 void GattServicesDiscovered(device::BluetoothAdapter* adapter,
77 device::BluetoothDevice* device) override; 77 device::BluetoothDevice* device) override;
78 78
79 void GattDiscoveryCompleteForService( 79 void GattDiscoveryCompleteForService(
80 device::BluetoothAdapter* adapter, 80 device::BluetoothAdapter* adapter,
81 device::BluetoothGattService* service) override; 81 device::BluetoothRemoteGattService* service) override;
82 82
83 void GattServiceChanged(device::BluetoothAdapter* adapter, 83 void GattServiceChanged(device::BluetoothAdapter* adapter,
84 device::BluetoothGattService* service) override; 84 device::BluetoothRemoteGattService* service) override;
85 85
86 void GattCharacteristicAdded( 86 void GattCharacteristicAdded(
87 device::BluetoothAdapter* adapter, 87 device::BluetoothAdapter* adapter,
88 device::BluetoothGattCharacteristic* characteristic) override; 88 device::BluetoothRemoteGattCharacteristic* characteristic) override;
89 89
90 void GattCharacteristicRemoved( 90 void GattCharacteristicRemoved(
91 device::BluetoothAdapter* adapter, 91 device::BluetoothAdapter* adapter,
92 device::BluetoothGattCharacteristic* characteristic) override; 92 device::BluetoothRemoteGattCharacteristic* characteristic) override;
93 93
94 void GattDescriptorAdded( 94 void GattDescriptorAdded(
95 device::BluetoothAdapter* adapter, 95 device::BluetoothAdapter* adapter,
96 device::BluetoothGattDescriptor* descriptor) override; 96 device::BluetoothRemoteGattDescriptor* descriptor) override;
97 97
98 void GattDescriptorRemoved( 98 void GattDescriptorRemoved(
99 device::BluetoothAdapter* adapter, 99 device::BluetoothAdapter* adapter,
100 device::BluetoothGattDescriptor* descriptor) override; 100 device::BluetoothRemoteGattDescriptor* descriptor) override;
101 101
102 void GattCharacteristicValueChanged( 102 void GattCharacteristicValueChanged(
103 device::BluetoothAdapter* adapter, 103 device::BluetoothAdapter* adapter,
104 device::BluetoothGattCharacteristic* characteristic, 104 device::BluetoothRemoteGattCharacteristic* characteristic,
105 const std::vector<uint8_t>& value) override; 105 const std::vector<uint8_t>& value) override;
106 106
107 void GattDescriptorValueChanged(device::BluetoothAdapter* adapter, 107 void GattDescriptorValueChanged(
108 device::BluetoothGattDescriptor* descriptor, 108 device::BluetoothAdapter* adapter,
109 const std::vector<uint8_t>& value) override; 109 device::BluetoothRemoteGattDescriptor* descriptor,
110 const std::vector<uint8_t>& value) override;
110 111
111 // Bluetooth Mojo host interface 112 // Bluetooth Mojo host interface
112 void EnableAdapter(const EnableAdapterCallback& callback) override; 113 void EnableAdapter(const EnableAdapterCallback& callback) override;
113 void DisableAdapter(const DisableAdapterCallback& callback) override; 114 void DisableAdapter(const DisableAdapterCallback& callback) override;
114 115
115 void GetAdapterProperty(mojom::BluetoothPropertyType type) override; 116 void GetAdapterProperty(mojom::BluetoothPropertyType type) override;
116 void SetAdapterProperty(mojom::BluetoothPropertyPtr property) override; 117 void SetAdapterProperty(mojom::BluetoothPropertyPtr property) override;
117 118
118 void GetRemoteDeviceProperty(mojom::BluetoothAddressPtr remote_addr, 119 void GetRemoteDeviceProperty(mojom::BluetoothAddressPtr remote_addr,
119 mojom::BluetoothPropertyType type) override; 120 mojom::BluetoothPropertyType type) override;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 174
174 // WeakPtrFactory to use for callbacks. 175 // WeakPtrFactory to use for callbacks.
175 base::WeakPtrFactory<ArcBluetoothBridge> weak_factory_; 176 base::WeakPtrFactory<ArcBluetoothBridge> weak_factory_;
176 177
177 DISALLOW_COPY_AND_ASSIGN(ArcBluetoothBridge); 178 DISALLOW_COPY_AND_ASSIGN(ArcBluetoothBridge);
178 }; 179 };
179 180
180 } // namespace arc 181 } // namespace arc
181 182
182 #endif // COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_ 183 #endif // COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698