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

Side by Side Diff: device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.h

Issue 2039773005: Add support in Chrome to send notifications to a specific device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_IMP L_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_IMP L_H_
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_IMP L_H_ 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_IMP L_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 21 matching lines...) Expand all
32 dbus::Bus* bus, 32 dbus::Bus* bus,
33 const dbus::ObjectPath& object_path, 33 const dbus::ObjectPath& object_path,
34 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate, 34 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate,
35 const std::string& uuid, 35 const std::string& uuid,
36 const std::vector<std::string>& flags, 36 const std::vector<std::string>& flags,
37 const dbus::ObjectPath& service_path); 37 const dbus::ObjectPath& service_path);
38 38
39 ~BluetoothGattCharacteristicServiceProviderImpl() override; 39 ~BluetoothGattCharacteristicServiceProviderImpl() override;
40 40
41 // BluetoothGattCharacteristicServiceProvider override. 41 // BluetoothGattCharacteristicServiceProvider override.
42 void SendValueChanged(const std::vector<uint8_t>& value) override; 42 void SendValueChanged(const dbus::ObjectPath& device_path,
43 const std::vector<uint8_t>& value,
44 bool indicate) override;
43 45
44 private: 46 private:
45 // Returns true if the current thread is on the origin thread. 47 // Returns true if the current thread is on the origin thread.
46 bool OnOriginThread(); 48 bool OnOriginThread();
47 49
48 // Called by dbus:: when the Bluetooth daemon fetches a single property of 50 // Called by dbus:: when the Bluetooth daemon fetches a single property of
49 // the characteristic. 51 // the characteristic.
50 void Get(dbus::MethodCall* method_call, 52 void Get(dbus::MethodCall* method_call,
51 dbus::ExportedObject::ResponseSender response_sender); 53 dbus::ExportedObject::ResponseSender response_sender);
52 54
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // invalidate its weak pointers before any other members are destroyed. 150 // invalidate its weak pointers before any other members are destroyed.
149 base::WeakPtrFactory<BluetoothGattCharacteristicServiceProviderImpl> 151 base::WeakPtrFactory<BluetoothGattCharacteristicServiceProviderImpl>
150 weak_ptr_factory_; 152 weak_ptr_factory_;
151 153
152 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicServiceProviderImpl); 154 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicServiceProviderImpl);
153 }; 155 };
154 156
155 } // namespace bluez 157 } // namespace bluez
156 158
157 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_ IMPL_H_ 159 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_ IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698