OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_CONNECTION_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_CONNECTION_H |
6 #define COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_CONNECTION_H | 6 #define COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_CONNECTION_H |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 public: | 30 public: |
31 // Constructs a Bluetooth connection to the service with |uuid| on the | 31 // Constructs a Bluetooth connection to the service with |uuid| on the |
32 // |remote_device|. The |remote_device| must already be known to the system | 32 // |remote_device|. The |remote_device| must already be known to the system |
33 // Bluetooth daemon. | 33 // Bluetooth daemon. |
34 BluetoothConnection(const RemoteDevice& remote_device, | 34 BluetoothConnection(const RemoteDevice& remote_device, |
35 const device::BluetoothUUID& uuid); | 35 const device::BluetoothUUID& uuid); |
36 virtual ~BluetoothConnection(); | 36 virtual ~BluetoothConnection(); |
37 | 37 |
38 protected: | 38 protected: |
39 // Connection: | 39 // Connection: |
40 virtual void Connect() OVERRIDE; | 40 virtual void Connect() override; |
41 virtual void Disconnect() OVERRIDE; | 41 virtual void Disconnect() override; |
42 virtual void SendMessageImpl(scoped_ptr<WireMessage> message) OVERRIDE; | 42 virtual void SendMessageImpl(scoped_ptr<WireMessage> message) override; |
43 | 43 |
44 // BluetoothAdapter::Observer: | 44 // BluetoothAdapter::Observer: |
45 virtual void DeviceRemoved(device::BluetoothAdapter* adapter, | 45 virtual void DeviceRemoved(device::BluetoothAdapter* adapter, |
46 device::BluetoothDevice* device) OVERRIDE; | 46 device::BluetoothDevice* device) override; |
47 | 47 |
48 // Exposed for testing. | 48 // Exposed for testing. |
49 virtual void ConnectToService( | 49 virtual void ConnectToService( |
50 device::BluetoothDevice* device, | 50 device::BluetoothDevice* device, |
51 const device::BluetoothUUID& uuid, | 51 const device::BluetoothUUID& uuid, |
52 const device::BluetoothDevice::ConnectToServiceCallback& callback, | 52 const device::BluetoothDevice::ConnectToServiceCallback& callback, |
53 const device::BluetoothDevice::ConnectToServiceErrorCallback& | 53 const device::BluetoothDevice::ConnectToServiceErrorCallback& |
54 error_callback); | 54 error_callback); |
55 | 55 |
56 private: | 56 private: |
(...skipping 27 matching lines...) Expand all Loading... |
84 scoped_ptr<WireMessage> pending_message_; | 84 scoped_ptr<WireMessage> pending_message_; |
85 | 85 |
86 base::WeakPtrFactory<BluetoothConnection> weak_ptr_factory_; | 86 base::WeakPtrFactory<BluetoothConnection> weak_ptr_factory_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(BluetoothConnection); | 88 DISALLOW_COPY_AND_ASSIGN(BluetoothConnection); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace proximity_auth | 91 } // namespace proximity_auth |
92 | 92 |
93 #endif // COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_CONNECTION_H | 93 #endif // COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_CONNECTION_H |
OLD | NEW |