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 CHROMEOS_PAIRING_BLUETOOTH_CONTROLLER_PAIRING_FLOW_H_ | 5 #ifndef CHROMEOS_PAIRING_BLUETOOTH_CONTROLLER_PAIRING_FLOW_H_ |
6 #define CHROMEOS_PAIRING_BLUETOOTH_CONTROLLER_PAIRING_FLOW_H_ | 6 #define CHROMEOS_PAIRING_BLUETOOTH_CONTROLLER_PAIRING_FLOW_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 public: | 31 public: |
32 BluetoothControllerPairingController(); | 32 BluetoothControllerPairingController(); |
33 virtual ~BluetoothControllerPairingController(); | 33 virtual ~BluetoothControllerPairingController(); |
34 | 34 |
35 private: | 35 private: |
36 void ChangeStage(Stage new_stage); | 36 void ChangeStage(Stage new_stage); |
37 device::BluetoothDevice* GetController(); | 37 device::BluetoothDevice* GetController(); |
38 void Reset(); | 38 void Reset(); |
39 void DeviceFound(device::BluetoothDevice* device); | 39 void DeviceFound(device::BluetoothDevice* device); |
40 void DeviceLost(device::BluetoothDevice* device); | 40 void DeviceLost(device::BluetoothDevice* device); |
| 41 void SendBuffer(scoped_refptr<net::IOBuffer> io_buffer, int size); |
41 | 42 |
42 void OnSetPowered(); | 43 void OnSetPowered(); |
43 void OnGetAdapter(scoped_refptr<device::BluetoothAdapter> adapter); | 44 void OnGetAdapter(scoped_refptr<device::BluetoothAdapter> adapter); |
44 void OnStartDiscoverySession( | 45 void OnStartDiscoverySession( |
45 scoped_ptr<device::BluetoothDiscoverySession> discovery_session); | 46 scoped_ptr<device::BluetoothDiscoverySession> discovery_session); |
46 void OnConnect(); | 47 void OnConnect(); |
47 void OnConnectToService(scoped_refptr<device::BluetoothSocket> socket); | 48 void OnConnectToService(scoped_refptr<device::BluetoothSocket> socket); |
48 void OnSendComplete(int bytes_sent); | 49 void OnSendComplete(int bytes_sent); |
49 void OnReceiveComplete(int bytes, scoped_refptr<net::IOBuffer> io_buffer); | 50 void OnReceiveComplete(int bytes, scoped_refptr<net::IOBuffer> io_buffer); |
50 | 51 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 base::ThreadChecker thread_checker_; | 122 base::ThreadChecker thread_checker_; |
122 ObserverList<ControllerPairingController::Observer> observers_; | 123 ObserverList<ControllerPairingController::Observer> observers_; |
123 base::WeakPtrFactory<BluetoothControllerPairingController> ptr_factory_; | 124 base::WeakPtrFactory<BluetoothControllerPairingController> ptr_factory_; |
124 | 125 |
125 DISALLOW_COPY_AND_ASSIGN(BluetoothControllerPairingController); | 126 DISALLOW_COPY_AND_ASSIGN(BluetoothControllerPairingController); |
126 }; | 127 }; |
127 | 128 |
128 } // namespace pairing_chromeos | 129 } // namespace pairing_chromeos |
129 | 130 |
130 #endif // CHROMEOS_PAIRING_BLUETOOTH_CONTROLLER_PAIRING_FLOW_H_ | 131 #endif // CHROMEOS_PAIRING_BLUETOOTH_CONTROLLER_PAIRING_FLOW_H_ |
OLD | NEW |