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

Side by Side Diff: device/bluetooth/bluetooth_advertisement_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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BLUETOOTH_ADVERTISEMENT_CHROMEOS_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_BLUEZ_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_CHROMEOS_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_BLUEZ_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "device/bluetooth/bluetooth_adapter.h" 9 #include "device/bluetooth/bluetooth_adapter.h"
10 #include "device/bluetooth/bluetooth_advertisement.h" 10 #include "device/bluetooth/bluetooth_advertisement.h"
11 #include "device/bluetooth/bluetooth_export.h" 11 #include "device/bluetooth/bluetooth_export.h"
12 #include "device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h" 12 #include "device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h"
13 13
14 namespace bluez { 14 namespace bluez {
15 class BluetoothLEAdvertisementServiceProvider; 15 class BluetoothLEAdvertisementServiceProvider;
16 } 16 }
17 17
18 namespace chromeos { 18 namespace bluez {
19 19
20 class BluetoothAdapterChromeOS; 20 class BluetoothAdapterBlueZ;
21 21
22 // The BluetoothAdvertisementChromeOS class implements BluetoothAdvertisement 22 // The BluetoothAdvertisementBlueZ class implements BluetoothAdvertisement
23 // for the Chrome OS platform. 23 // for the Chrome OS platform.
ortuno 2015/11/06 18:15:42 There is a "Chrome OS" you forgot to remove here.
rkc 2015/11/25 00:48:16 Done.
24 class DEVICE_BLUETOOTH_EXPORT BluetoothAdvertisementChromeOS 24 class DEVICE_BLUETOOTH_EXPORT BluetoothAdvertisementBlueZ
25 : public device::BluetoothAdvertisement, 25 : public device::BluetoothAdvertisement,
26 public bluez::BluetoothLEAdvertisementServiceProvider::Delegate { 26 public bluez::BluetoothLEAdvertisementServiceProvider::Delegate {
27 public: 27 public:
28 BluetoothAdvertisementChromeOS( 28 BluetoothAdvertisementBlueZ(
29 scoped_ptr<device::BluetoothAdvertisement::Data> data, 29 scoped_ptr<device::BluetoothAdvertisement::Data> data,
30 scoped_refptr<BluetoothAdapterChromeOS> adapter); 30 scoped_refptr<BluetoothAdapterBlueZ> adapter);
31 31
32 // BluetoothAdvertisement overrides: 32 // BluetoothAdvertisement overrides:
33 void Unregister(const SuccessCallback& success_callback, 33 void Unregister(const SuccessCallback& success_callback,
34 const ErrorCallback& error_callback) override; 34 const ErrorCallback& error_callback) override;
35 35
36 // bluez::BluetoothLEAdvertisementServiceProvider::Delegate overrides: 36 // bluez::BluetoothLEAdvertisementServiceProvider::Delegate overrides:
37 void Released() override; 37 void Released() override;
38 38
39 void Register( 39 void Register(
40 const base::Closure& success_callback, 40 const base::Closure& success_callback,
41 const device::BluetoothAdapter::CreateAdvertisementErrorCallback& 41 const device::BluetoothAdapter::CreateAdvertisementErrorCallback&
42 error_callback); 42 error_callback);
43 43
44 // Used from tests to be able to trigger events on the fake advertisement 44 // Used from tests to be able to trigger events on the fake advertisement
45 // provider. 45 // provider.
46 bluez::BluetoothLEAdvertisementServiceProvider* provider() { 46 bluez::BluetoothLEAdvertisementServiceProvider* provider() {
47 return provider_.get(); 47 return provider_.get();
48 } 48 }
49 49
50 private: 50 private:
51 ~BluetoothAdvertisementChromeOS() override; 51 ~BluetoothAdvertisementBlueZ() override;
52 52
53 // Adapter this advertisement is advertising on. 53 // Adapter this advertisement is advertising on.
54 scoped_refptr<BluetoothAdapterChromeOS> adapter_; 54 scoped_refptr<BluetoothAdapterBlueZ> adapter_;
55 scoped_ptr<bluez::BluetoothLEAdvertisementServiceProvider> provider_; 55 scoped_ptr<bluez::BluetoothLEAdvertisementServiceProvider> provider_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementChromeOS); 57 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementBlueZ);
58 }; 58 };
59 59
60 } // namespace chromeos 60 } // namespace bluez
61 61
62 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_CHROMEOS_H_ 62 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_BLUEZ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698