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

Side by Side Diff: device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h

Issue 1973343005: Remove service, add device, in BluetoothLocalGattService::Delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_
6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_ 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "device/bluetooth/bluetooth_local_gatt_characteristic.h" 10 #include "device/bluetooth/bluetooth_local_gatt_characteristic.h"
(...skipping 15 matching lines...) Expand all
26 BluetoothLocalGattDescriptorBlueZ( 26 BluetoothLocalGattDescriptorBlueZ(
27 const device::BluetoothUUID& uuid, 27 const device::BluetoothUUID& uuid,
28 device::BluetoothGattCharacteristic::Permissions permissions, 28 device::BluetoothGattCharacteristic::Permissions permissions,
29 BluetoothLocalGattCharacteristicBlueZ* characteristic); 29 BluetoothLocalGattCharacteristicBlueZ* characteristic);
30 ~BluetoothLocalGattDescriptorBlueZ() override; 30 ~BluetoothLocalGattDescriptorBlueZ() override;
31 31
32 // device::BluetoothLocalGattDescriptor overrides. 32 // device::BluetoothLocalGattDescriptor overrides.
33 device::BluetoothUUID GetUUID() const override; 33 device::BluetoothUUID GetUUID() const override;
34 device::BluetoothGattCharacteristic::Permissions GetPermissions() 34 device::BluetoothGattCharacteristic::Permissions GetPermissions()
35 const override; 35 const override;
36 36 device::BluetoothLocalGattCharacteristic* GetCharacteristic() const override;
37 BluetoothLocalGattCharacteristicBlueZ* GetCharacteristic() const;
38 37
39 private: 38 private:
40 // Needs access to weak_ptr_factory_. 39 // Needs access to weak_ptr_factory_.
41 friend class device::BluetoothLocalGattDescriptor; 40 friend class device::BluetoothLocalGattDescriptor;
42 41
43 // UUID of this descriptor. 42 // UUID of this descriptor.
44 device::BluetoothUUID uuid_; 43 device::BluetoothUUID uuid_;
45 44
46 // Permissions of this descriptor. 45 // Permissions of this descriptor.
47 device::BluetoothGattCharacteristic::Permissions permissions_; 46 device::BluetoothGattCharacteristic::Permissions permissions_;
48 47
49 // Characteristic that contains this descriptor. 48 // Characteristic that contains this descriptor.
50 BluetoothLocalGattCharacteristicBlueZ* characteristic_; 49 BluetoothLocalGattCharacteristicBlueZ* characteristic_;
51 50
52 // Note: This should remain the last member so it'll be destroyed and 51 // Note: This should remain the last member so it'll be destroyed and
53 // invalidate its weak pointers before any other members are destroyed. 52 // invalidate its weak pointers before any other members are destroyed.
54 base::WeakPtrFactory<BluetoothLocalGattDescriptorBlueZ> weak_ptr_factory_; 53 base::WeakPtrFactory<BluetoothLocalGattDescriptorBlueZ> weak_ptr_factory_;
55 54
56 DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattDescriptorBlueZ); 55 DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattDescriptorBlueZ);
57 }; 56 };
58 57
59 } // namespace bluez 58 } // namespace bluez
60 59
61 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_ 60 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698