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

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

Issue 1885683005: Add module suffix in .mojom files for components/arc (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>
(...skipping 13 matching lines...) Expand all
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,
33 public device::BluetoothAdapterFactory::AdapterCallback, 33 public device::BluetoothAdapterFactory::AdapterCallback,
34 public BluetoothHost { 34 public mojom::BluetoothHost {
35 public: 35 public:
36 explicit ArcBluetoothBridge(ArcBridgeService* bridge_service); 36 explicit ArcBluetoothBridge(ArcBridgeService* bridge_service);
37 ~ArcBluetoothBridge() override; 37 ~ArcBluetoothBridge() override;
38 38
39 // Overridden from ArcBridgeService::Observer: 39 // Overridden from ArcBridgeService::Observer:
40 void OnBluetoothInstanceReady() override; 40 void OnBluetoothInstanceReady() override;
41 41
42 void OnAdapterInitialized(scoped_refptr<device::BluetoothAdapter> adapter); 42 void OnAdapterInitialized(scoped_refptr<device::BluetoothAdapter> adapter);
43 43
44 // Overridden from device::BluetoothAdadpter::Observer 44 // Overridden from device::BluetoothAdadpter::Observer
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const std::vector<uint8_t>& value) override; 101 const std::vector<uint8_t>& value) override;
102 102
103 void GattDescriptorValueChanged(device::BluetoothAdapter* adapter, 103 void GattDescriptorValueChanged(device::BluetoothAdapter* adapter,
104 device::BluetoothGattDescriptor* descriptor, 104 device::BluetoothGattDescriptor* descriptor,
105 const std::vector<uint8_t>& value) override; 105 const std::vector<uint8_t>& value) override;
106 106
107 // Bluetooth Mojo host interface 107 // Bluetooth Mojo host interface
108 void EnableAdapter(const EnableAdapterCallback& callback) override; 108 void EnableAdapter(const EnableAdapterCallback& callback) override;
109 void DisableAdapter(const DisableAdapterCallback& callback) override; 109 void DisableAdapter(const DisableAdapterCallback& callback) override;
110 110
111 void GetAdapterProperty(BluetoothPropertyType type) override; 111 void GetAdapterProperty(mojom::BluetoothPropertyType type) override;
112 void SetAdapterProperty(BluetoothPropertyPtr property) override; 112 void SetAdapterProperty(mojom::BluetoothPropertyPtr property) override;
113 113
114 void GetRemoteDeviceProperty(BluetoothAddressPtr remote_addr, 114 void GetRemoteDeviceProperty(mojom::BluetoothAddressPtr remote_addr,
115 BluetoothPropertyType type) override; 115 mojom::BluetoothPropertyType type) override;
116 void SetRemoteDeviceProperty(BluetoothAddressPtr remote_addr, 116 void SetRemoteDeviceProperty(mojom::BluetoothAddressPtr remote_addr,
117 BluetoothPropertyPtr property) override; 117 mojom::BluetoothPropertyPtr property) override;
118 void GetRemoteServiceRecord(BluetoothAddressPtr remote_addr, 118 void GetRemoteServiceRecord(mojom::BluetoothAddressPtr remote_addr,
119 BluetoothUUIDPtr uuid) override; 119 mojom::BluetoothUUIDPtr uuid) override;
120 120
121 void GetRemoteServices(BluetoothAddressPtr remote_addr) override; 121 void GetRemoteServices(mojom::BluetoothAddressPtr remote_addr) override;
122 122
123 void StartDiscovery() override; 123 void StartDiscovery() override;
124 void CancelDiscovery() override; 124 void CancelDiscovery() override;
125 125
126 void CreateBond(BluetoothAddressPtr addr, int32_t transport) override; 126 void CreateBond(mojom::BluetoothAddressPtr addr, int32_t transport) override;
127 void RemoveBond(BluetoothAddressPtr addr) override; 127 void RemoveBond(mojom::BluetoothAddressPtr addr) override;
128 void CancelBond(BluetoothAddressPtr addr) override; 128 void CancelBond(mojom::BluetoothAddressPtr addr) override;
129 129
130 void GetConnectionState(BluetoothAddressPtr addr, 130 void GetConnectionState(mojom::BluetoothAddressPtr addr,
131 const GetConnectionStateCallback& callback) override; 131 const GetConnectionStateCallback& callback) override;
132 132
133 // Chrome observer callbacks 133 // Chrome observer callbacks
134 void OnPoweredOn( 134 void OnPoweredOn(
135 const mojo::Callback<void(BluetoothAdapterState)>& callback) const; 135 const mojo::Callback<void(mojom::BluetoothAdapterState)>& callback) const;
136 void OnPoweredOff( 136 void OnPoweredOff(
137 const mojo::Callback<void(BluetoothAdapterState)>& callback) const; 137 const mojo::Callback<void(mojom::BluetoothAdapterState)>& callback) const;
138 void OnPoweredError( 138 void OnPoweredError(
139 const mojo::Callback<void(BluetoothAdapterState)>& callback) const; 139 const mojo::Callback<void(mojom::BluetoothAdapterState)>& callback) const;
140 void OnDiscoveryStarted( 140 void OnDiscoveryStarted(
141 scoped_ptr<device::BluetoothDiscoverySession> session); 141 scoped_ptr<device::BluetoothDiscoverySession> session);
142 void OnDiscoveryStopped(); 142 void OnDiscoveryStopped();
143 void OnDiscoveryError(); 143 void OnDiscoveryError();
144 144
145 private: 145 private:
146 mojo::Array<BluetoothPropertyPtr> GetDeviceProperties( 146 mojo::Array<mojom::BluetoothPropertyPtr> GetDeviceProperties(
147 BluetoothPropertyType type, 147 mojom::BluetoothPropertyType type,
148 device::BluetoothDevice* device); 148 device::BluetoothDevice* device);
149 mojo::Array<BluetoothPropertyPtr> GetAdapterProperties( 149 mojo::Array<mojom::BluetoothPropertyPtr> GetAdapterProperties(
150 BluetoothPropertyType type); 150 mojom::BluetoothPropertyType type);
151 151
152 void SendCachedDevicesFound(); 152 void SendCachedDevicesFound();
153 bool HasBluetoothInstance(); 153 bool HasBluetoothInstance();
154 154
155 mojo::Binding<BluetoothHost> binding_; 155 mojo::Binding<mojom::BluetoothHost> binding_;
156 156
157 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; 157 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_;
158 scoped_ptr<device::BluetoothDiscoverySession> discovery_session_; 158 scoped_ptr<device::BluetoothDiscoverySession> discovery_session_;
159 159
160 // WeakPtrFactory to use for callbacks. 160 // WeakPtrFactory to use for callbacks.
161 base::WeakPtrFactory<ArcBluetoothBridge> weak_factory_; 161 base::WeakPtrFactory<ArcBluetoothBridge> weak_factory_;
162 162
163 DISALLOW_COPY_AND_ASSIGN(ArcBluetoothBridge); 163 DISALLOW_COPY_AND_ASSIGN(ArcBluetoothBridge);
164 }; 164 };
165 165
166 } // namespace arc 166 } // namespace arc
167 167
168 #endif // COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_ 168 #endif // COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698