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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.h

Issue 1415573014: Reland "Add Linux support for the Bluetooth API" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.h
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.h
similarity index 86%
rename from device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h
rename to device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.h
index 361b31973e409ea9fc361d02ab3dacd302412729..664f0fccbe326efb4be8d81214bf4b87d501e67a 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_CHROMEOS_H_
-#define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_CHROMEOS_H_
+#ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_
+#define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_
#include <map>
#include <queue>
@@ -11,6 +11,7 @@
#include <utility>
#include <vector>
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "dbus/object_path.h"
#include "device/bluetooth/bluetooth_gatt_characteristic.h"
@@ -24,15 +25,15 @@ class BluetoothGattService;
} // namespace device
-namespace chromeos {
+namespace bluez {
-class BluetoothRemoteGattDescriptorChromeOS;
-class BluetoothRemoteGattServiceChromeOS;
+class BluetoothRemoteGattDescriptorBlueZ;
+class BluetoothRemoteGattServiceBlueZ;
-// The BluetoothRemoteGattCharacteristicChromeOS class implements
+// The BluetoothRemoteGattCharacteristicBlueZ class implements
// BluetoothGattCharacteristic for remote GATT characteristics on the Chrome OS
ortuno 2015/11/06 18:15:41 Leftover "Chrome OS" reference.
rkc 2015/11/25 00:48:16 Done.
// platform.
-class BluetoothRemoteGattCharacteristicChromeOS
+class BluetoothRemoteGattCharacteristicBlueZ
: public device::BluetoothGattCharacteristic,
public bluez::BluetoothGattDescriptorClient::Observer {
public:
@@ -68,15 +69,15 @@ class BluetoothRemoteGattCharacteristicChromeOS
const dbus::ObjectPath& object_path() const { return object_path_; }
private:
- friend class BluetoothRemoteGattServiceChromeOS;
+ friend class BluetoothRemoteGattServiceBlueZ;
typedef std::pair<NotifySessionCallback, ErrorCallback>
PendingStartNotifyCall;
- BluetoothRemoteGattCharacteristicChromeOS(
- BluetoothRemoteGattServiceChromeOS* service,
+ BluetoothRemoteGattCharacteristicBlueZ(
+ BluetoothRemoteGattServiceBlueZ* service,
const dbus::ObjectPath& object_path);
- ~BluetoothRemoteGattCharacteristicChromeOS() override;
+ ~BluetoothRemoteGattCharacteristicBlueZ() override;
// bluez::BluetoothGattDescriptorClient::Observer overrides.
void GattDescriptorAdded(const dbus::ObjectPath& object_path) override;
@@ -117,7 +118,7 @@ class BluetoothRemoteGattCharacteristicChromeOS
dbus::ObjectPath object_path_;
// The GATT service this GATT characteristic belongs to.
- BluetoothRemoteGattServiceChromeOS* service_;
+ BluetoothRemoteGattServiceBlueZ* service_;
// The total number of currently active value update sessions.
size_t num_notify_sessions_;
@@ -133,18 +134,18 @@ class BluetoothRemoteGattCharacteristicChromeOS
// this characteristic. Since the Chrome OS implementation uses object paths
ortuno 2015/11/06 18:15:42 Leftover "Chrome OS" reference.
rkc 2015/11/25 00:48:16 Done.
// as unique identifiers, we also use this mapping to return descriptors by
// identifier.
- typedef std::map<dbus::ObjectPath, BluetoothRemoteGattDescriptorChromeOS*>
+ typedef std::map<dbus::ObjectPath, BluetoothRemoteGattDescriptorBlueZ*>
DescriptorMap;
DescriptorMap descriptors_;
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
- base::WeakPtrFactory<BluetoothRemoteGattCharacteristicChromeOS>
+ base::WeakPtrFactory<BluetoothRemoteGattCharacteristicBlueZ>
weak_ptr_factory_;
- DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicChromeOS);
+ DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicBlueZ);
};
-} // namespace chromeos
+} // namespace bluez
-#endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_CHROMEOS_H_
+#endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_

Powered by Google App Engine
This is Rietveld 408576698