OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "device/bluetooth/bluetooth_adapter.h" | 5 #include "device/bluetooth/bluetooth_adapter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "device/bluetooth/bluetooth_device.h" | 9 #include "device/bluetooth/bluetooth_device.h" |
10 #include "device/bluetooth/bluetooth_discovery_session.h" | 10 #include "device/bluetooth/bluetooth_discovery_session.h" |
11 | 11 |
12 namespace device { | 12 namespace device { |
13 | 13 |
14 #if !defined(OS_CHROMEOS) && !defined(OS_WIN) && !defined(OS_MACOSX) | 14 #if !defined(OS_CHROMEOS) && !defined(OS_WIN) && !defined(OS_MACOSX) |
15 //static | 15 //static |
16 base::WeakPtr<BluetoothAdapter> BluetoothAdapter::CreateAdapter( | 16 base::WeakPtr<BluetoothAdapter> BluetoothAdapter::CreateAdapter( |
17 const InitCallback& init_callback) { | 17 const InitCallback& init_callback) { |
18 return base::WeakPtr<BluetoothAdapter>(); | 18 return base::WeakPtr<BluetoothAdapter>(); |
19 } | 19 } |
20 #endif // !defined(OS_CHROMEOS) && !defined(OS_WIN) && !defined(OS_MACOSX) | 20 #endif // !defined(OS_CHROMEOS) && !defined(OS_WIN) && !defined(OS_MACOSX) |
21 | 21 |
| 22 const int BluetoothAdapter::kChannelAuto = 0; |
| 23 const int BluetoothAdapter::kPsmAuto = 0; |
22 | 24 |
23 BluetoothAdapter::BluetoothAdapter() | 25 BluetoothAdapter::BluetoothAdapter() |
24 : weak_ptr_factory_(this) { | 26 : weak_ptr_factory_(this) { |
25 } | 27 } |
26 | 28 |
27 BluetoothAdapter::~BluetoothAdapter() { | 29 BluetoothAdapter::~BluetoothAdapter() { |
28 STLDeleteValues(&devices_); | 30 STLDeleteValues(&devices_); |
29 } | 31 } |
30 | 32 |
31 base::WeakPtr<BluetoothAdapter> BluetoothAdapter::GetWeakPtrForTesting() { | 33 base::WeakPtr<BluetoothAdapter> BluetoothAdapter::GetWeakPtrForTesting() { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 } | 136 } |
135 } | 137 } |
136 | 138 |
137 void BluetoothAdapter::DiscoverySessionBecameInactive( | 139 void BluetoothAdapter::DiscoverySessionBecameInactive( |
138 BluetoothDiscoverySession* discovery_session) { | 140 BluetoothDiscoverySession* discovery_session) { |
139 DCHECK(!discovery_session->IsActive()); | 141 DCHECK(!discovery_session->IsActive()); |
140 discovery_sessions_.erase(discovery_session); | 142 discovery_sessions_.erase(discovery_session); |
141 } | 143 } |
142 | 144 |
143 } // namespace device | 145 } // namespace device |
OLD | NEW |