| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_PROFILE_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // to this callback. | 92 // to this callback. |
| 93 // | 93 // |
| 94 // The socket will be closed when all references are released; none of the | 94 // The socket will be closed when all references are released; none of the |
| 95 // BluetoothProfile, or BluetoothAdapter or BluetoothDevice objects are | 95 // BluetoothProfile, or BluetoothAdapter or BluetoothDevice objects are |
| 96 // guaranteed to hold a reference so this may outlive all of them. | 96 // guaranteed to hold a reference so this may outlive all of them. |
| 97 typedef base::Callback<void( | 97 typedef base::Callback<void( |
| 98 const BluetoothDevice*, | 98 const BluetoothDevice*, |
| 99 scoped_refptr<BluetoothSocket>)> ConnectionCallback; | 99 scoped_refptr<BluetoothSocket>)> ConnectionCallback; |
| 100 virtual void SetConnectionCallback(const ConnectionCallback& callback) = 0; | 100 virtual void SetConnectionCallback(const ConnectionCallback& callback) = 0; |
| 101 | 101 |
| 102 private: | 102 protected: |
| 103 friend class BluetoothProfileMac; | |
| 104 friend class MockBluetoothProfile; | |
| 105 | |
| 106 BluetoothProfile(); | 103 BluetoothProfile(); |
| 107 virtual ~BluetoothProfile(); | 104 virtual ~BluetoothProfile(); |
| 108 }; | 105 }; |
| 109 | 106 |
| 110 } // namespace device | 107 } // namespace device |
| 111 | 108 |
| 112 #endif // DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_H_ | 109 #endif // DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_H_ |
| OLD | NEW |