| 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 CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "content/common/bluetooth/bluetooth_error.h" | 10 #include "content/common/bluetooth/bluetooth_error.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // Stop in progress discovery session. | 63 // Stop in progress discovery session. |
| 64 void StopDiscoverySession( | 64 void StopDiscoverySession( |
| 65 int thread_id, | 65 int thread_id, |
| 66 int request_id, | 66 int request_id, |
| 67 scoped_ptr<device::BluetoothDiscoverySession> discovery_session); | 67 scoped_ptr<device::BluetoothDiscoverySession> discovery_session); |
| 68 | 68 |
| 69 // Callbacks for BluetoothDiscoverySession::Stop. | 69 // Callbacks for BluetoothDiscoverySession::Stop. |
| 70 void OnDiscoverySessionStopped(int thread_id, int request_id); | 70 void OnDiscoverySessionStopped(int thread_id, int request_id); |
| 71 void OnDiscoverySessionStoppedError(int thread_id, int request_id); | 71 void OnDiscoverySessionStoppedError(int thread_id, int request_id); |
| 72 | 72 |
| 73 // Defines how long to scan for. |
| 74 int current_scan_time_; |
| 75 |
| 73 // A BluetoothAdapter instance representing an adapter of the system. | 76 // A BluetoothAdapter instance representing an adapter of the system. |
| 74 scoped_refptr<device::BluetoothAdapter> adapter_; | 77 scoped_refptr<device::BluetoothAdapter> adapter_; |
| 75 | 78 |
| 76 BrowserContext* browser_context_; | 79 BrowserContext* browser_context_; |
| 77 | 80 |
| 78 enum class MockData { NOT_MOCKING, REJECT, RESOLVE }; | |
| 79 MockData bluetooth_mock_data_set_; | |
| 80 BluetoothError bluetooth_request_device_reject_type_; | |
| 81 | |
| 82 // Must be last member, see base/memory/weak_ptr.h documentation | 81 // Must be last member, see base/memory/weak_ptr.h documentation |
| 83 base::WeakPtrFactory<BluetoothDispatcherHost> weak_ptr_factory_; | 82 base::WeakPtrFactory<BluetoothDispatcherHost> weak_ptr_factory_; |
| 84 | 83 |
| 85 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); | 84 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); |
| 86 }; | 85 }; |
| 87 | 86 |
| 88 } // namespace content | 87 } // namespace content |
| 89 | 88 |
| 90 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ | 89 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ |
| OLD | NEW |