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

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

Issue 2354933003: arc: bluetooth: Clean up arc_bluetooth_bridge (Closed)
Patch Set: Rebase Created 4 years, 2 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
« no previous file with comments | « no previous file | components/arc/bluetooth/arc_bluetooth_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory> 10 #include <memory>
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 device::BluetoothAdvertisement::ErrorCode error_code); 314 device::BluetoothAdvertisement::ErrorCode error_code);
315 315
316 void OnGattNotifyStartDone( 316 void OnGattNotifyStartDone(
317 const RegisterForGattNotificationCallback& callback, 317 const RegisterForGattNotificationCallback& callback,
318 const std::string char_string_id, 318 const std::string char_string_id,
319 std::unique_ptr<device::BluetoothGattNotifySession> notify_session); 319 std::unique_ptr<device::BluetoothGattNotifySession> notify_session);
320 320
321 private: 321 private:
322 mojo::Array<mojom::BluetoothPropertyPtr> GetDeviceProperties( 322 mojo::Array<mojom::BluetoothPropertyPtr> GetDeviceProperties(
323 mojom::BluetoothPropertyType type, 323 mojom::BluetoothPropertyType type,
324 device::BluetoothDevice* device) const; 324 const device::BluetoothDevice* device) const;
325 mojo::Array<mojom::BluetoothPropertyPtr> GetAdapterProperties( 325 mojo::Array<mojom::BluetoothPropertyPtr> GetAdapterProperties(
326 mojom::BluetoothPropertyType type) const; 326 mojom::BluetoothPropertyType type) const;
327 mojo::Array<mojom::BluetoothAdvertisingDataPtr> GetAdvertisingData( 327 mojo::Array<mojom::BluetoothAdvertisingDataPtr> GetAdvertisingData(
328 device::BluetoothDevice* device) const; 328 const device::BluetoothDevice* device) const;
329 329
330 void SendCachedDevicesFound() const; 330 void SendCachedDevicesFound() const;
331 331
332 device::BluetoothRemoteGattCharacteristic* FindGattCharacteristic( 332 device::BluetoothRemoteGattCharacteristic* FindGattCharacteristic(
333 mojom::BluetoothAddressPtr remote_addr, 333 mojom::BluetoothAddressPtr remote_addr,
334 mojom::BluetoothGattServiceIDPtr service_id, 334 mojom::BluetoothGattServiceIDPtr service_id,
335 mojom::BluetoothGattIDPtr char_id) const; 335 mojom::BluetoothGattIDPtr char_id) const;
336 336
337 device::BluetoothRemoteGattDescriptor* FindGattDescriptor( 337 device::BluetoothRemoteGattDescriptor* FindGattDescriptor(
338 mojom::BluetoothAddressPtr remote_addr, 338 mojom::BluetoothAddressPtr remote_addr,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 const device::BluetoothUUID& target_uuid, 373 const device::BluetoothUUID& target_uuid,
374 const std::vector<bluez::BluetoothServiceRecordBlueZ>& records_bluez); 374 const std::vector<bluez::BluetoothServiceRecordBlueZ>& records_bluez);
375 void OnGetServiceRecordsError( 375 void OnGetServiceRecordsError(
376 mojom::BluetoothAddressPtr remote_addr, 376 mojom::BluetoothAddressPtr remote_addr,
377 const device::BluetoothUUID& target_uuid, 377 const device::BluetoothUUID& target_uuid,
378 bluez::BluetoothServiceRecordBlueZ::ErrorCode error_code); 378 bluez::BluetoothServiceRecordBlueZ::ErrorCode error_code);
379 379
380 void OnSetAdapterProperty(mojom::BluetoothStatus success, 380 void OnSetAdapterProperty(mojom::BluetoothStatus success,
381 mojom::BluetoothPropertyPtr property); 381 mojom::BluetoothPropertyPtr property);
382 382
383 void SendDevice(const device::BluetoothDevice* device) const;
384
383 bool CalledOnValidThread(); 385 bool CalledOnValidThread();
384 386
385 mojo::Binding<mojom::BluetoothHost> binding_; 387 mojo::Binding<mojom::BluetoothHost> binding_;
386 388
387 scoped_refptr<bluez::BluetoothAdapterBlueZ> bluetooth_adapter_; 389 scoped_refptr<bluez::BluetoothAdapterBlueZ> bluetooth_adapter_;
388 scoped_refptr<device::BluetoothAdvertisement> advertisment_; 390 scoped_refptr<device::BluetoothAdvertisement> advertisment_;
389 std::unique_ptr<device::BluetoothDiscoverySession> discovery_session_; 391 std::unique_ptr<device::BluetoothDiscoverySession> discovery_session_;
390 std::unordered_map<std::string, 392 std::unordered_map<std::string,
391 std::unique_ptr<device::BluetoothGattNotifySession>> 393 std::unique_ptr<device::BluetoothGattNotifySession>>
392 notification_session_; 394 notification_session_;
(...skipping 22 matching lines...) Expand all
415 417
416 // WeakPtrFactory to use for callbacks. 418 // WeakPtrFactory to use for callbacks.
417 base::WeakPtrFactory<ArcBluetoothBridge> weak_factory_; 419 base::WeakPtrFactory<ArcBluetoothBridge> weak_factory_;
418 420
419 DISALLOW_COPY_AND_ASSIGN(ArcBluetoothBridge); 421 DISALLOW_COPY_AND_ASSIGN(ArcBluetoothBridge);
420 }; 422 };
421 423
422 } // namespace arc 424 } // namespace arc
423 425
424 #endif // COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_ 426 #endif // COMPONENTS_ARC_BLUETOOTH_ARC_BLUETOOTH_BRIDGE_H_
OLDNEW
« no previous file with comments | « no previous file | components/arc/bluetooth/arc_bluetooth_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698