Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_ADAPTER_PROFILE_CHROMEOS_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_PROFILE_CHROMEOS_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_PROFILE_CHROMEOS_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_PROFILE_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "chromeos/dbus/bluetooth_profile_manager_client.h" | 9 #include "chromeos/dbus/bluetooth_profile_manager_client.h" |
| 10 #include "chromeos/dbus/bluetooth_profile_service_provider.h" | 10 #include "chromeos/dbus/bluetooth_profile_service_provider.h" |
| 11 #include "device/bluetooth/bluetooth_adapter_chromeos.h" | 11 #include "device/bluetooth/bluetooth_adapter_chromeos.h" |
| 12 #include "device/bluetooth/bluetooth_export.h" | 12 #include "device/bluetooth/bluetooth_export.h" |
| 13 | 13 |
| 14 namespace device { | 14 namespace device { |
| 15 class BluetoothUUID; | 15 class BluetoothUUID; |
| 16 } // namespace device | 16 } // namespace device |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| 19 | 19 |
| 20 // The BluetoothAdapterProfileChromeOS class implements a multiplexing | 20 // The BluetoothAdapterProfileChromeOS class implements a multiplexing |
| 21 // profile for custom Bluetooth services managed by a BluetoothAdapter. | 21 // profile for custom Bluetooth services managed by a BluetoothAdapter. |
| 22 // Maintains a list of delegates which may serve the profile. | 22 // Maintains a list of delegates which may serve the profile. |
| 23 // One delegate is allowed for each device. | 23 // One delegate is allowed for each device. |
| 24 // | 24 // |
| 25 // This class is not thread-safe, but is only called from the dbus origin | |
| 26 // thread. | |
| 27 // | |
| 25 // BluetoothAdapterProfileChromeOS objects are owned by the | 28 // BluetoothAdapterProfileChromeOS objects are owned by the |
| 26 // BluetoothAdapterChromeOS and allocated through Register() | 29 // BluetoothAdapterChromeOS and allocated through Register() |
| 27 class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterProfileChromeOS | 30 class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterProfileChromeOS |
| 28 : public chromeos::BluetoothProfileServiceProvider::Delegate { | 31 : public chromeos::BluetoothProfileServiceProvider::Delegate { |
| 29 public: | 32 public: |
| 30 typedef base::Callback<void(scoped_ptr<BluetoothAdapterProfileChromeOS> | 33 typedef base::Callback<void(scoped_ptr<BluetoothAdapterProfileChromeOS> |
| 31 profile)> ProfileRegisteredCallback; | 34 profile)> ProfileRegisteredCallback; |
| 32 | 35 |
| 33 // Registers a profile with the BlueZ server for |uuid| with the | 36 // Registers a profile with the BlueZ server for |uuid| with the |
| 34 // options |options|. |success_callback| is provided with a newly | 37 // options |options|. |success_callback| is provided with a newly |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 | 99 |
| 97 // Note: This should remain the last member so it'll be destroyed and | 100 // Note: This should remain the last member so it'll be destroyed and |
| 98 // invalidate its weak pointers before any other members are destroyed. | 101 // invalidate its weak pointers before any other members are destroyed. |
| 99 base::WeakPtrFactory<BluetoothAdapterProfileChromeOS> weak_ptr_factory_; | 102 base::WeakPtrFactory<BluetoothAdapterProfileChromeOS> weak_ptr_factory_; |
| 100 | 103 |
| 101 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterProfileChromeOS); | 104 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterProfileChromeOS); |
| 102 }; | 105 }; |
| 103 | 106 |
| 104 } // namespace chromeos | 107 } // namespace chromeos |
| 105 | 108 |
| 106 #endif | 109 #endif |
|
omoikane
2015/06/23 01:23:40
Need end comments for header guard.
#endif // DEV
| |
| 110 | |
| OLD | NEW |