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 BluetoothAdapter::ServiceOptions::ServiceOptions() { | 14 BluetoothAdapter::ServiceOptions::ServiceOptions() { |
15 } | 15 } |
16 BluetoothAdapter::ServiceOptions::~ServiceOptions() { | 16 BluetoothAdapter::ServiceOptions::~ServiceOptions() { |
17 } | 17 } |
18 | 18 |
19 #if !defined(OS_CHROMEOS) && !defined(OS_WIN) && !defined(OS_MACOSX) | 19 #if !defined(OS_CHROMEOS) && !defined(OS_WIN) && !defined(OS_MACOSX) |
20 //static | 20 //static |
21 base::WeakPtr<BluetoothAdapter> BluetoothAdapter::CreateAdapter( | 21 base::WeakPtr<BluetoothAdapter> BluetoothAdapter::CreateAdapter( |
22 const InitCallback& init_callback) { | 22 const InitCallback& init_callback) { |
23 return base::WeakPtr<BluetoothAdapter>(); | 23 return base::WeakPtr<BluetoothAdapter>(); |
24 } | 24 } |
25 #endif // !defined(OS_CHROMEOS) && !defined(OS_WIN) && !defined(OS_MACOSX) | 25 #endif // !defined(OS_CHROMEOS) && !defined(OS_WIN) && !defined(OS_MACOSX) |
26 | 26 |
| 27 #if defined(OS_CHROMEOS) |
| 28 void BluetoothAdapter::Shutdown() { |
| 29 NOTIMPLEMENTED(); |
| 30 } |
| 31 #endif |
| 32 |
27 BluetoothAdapter::BluetoothAdapter() | 33 BluetoothAdapter::BluetoothAdapter() |
28 : weak_ptr_factory_(this) { | 34 : weak_ptr_factory_(this) { |
29 } | 35 } |
30 | 36 |
31 BluetoothAdapter::~BluetoothAdapter() { | 37 BluetoothAdapter::~BluetoothAdapter() { |
32 STLDeleteValues(&devices_); | 38 STLDeleteValues(&devices_); |
33 } | 39 } |
34 | 40 |
35 base::WeakPtr<BluetoothAdapter> BluetoothAdapter::GetWeakPtrForTesting() { | 41 base::WeakPtr<BluetoothAdapter> BluetoothAdapter::GetWeakPtrForTesting() { |
36 return weak_ptr_factory_.GetWeakPtr(); | 42 return weak_ptr_factory_.GetWeakPtr(); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 } | 149 } |
144 } | 150 } |
145 | 151 |
146 void BluetoothAdapter::DiscoverySessionBecameInactive( | 152 void BluetoothAdapter::DiscoverySessionBecameInactive( |
147 BluetoothDiscoverySession* discovery_session) { | 153 BluetoothDiscoverySession* discovery_session) { |
148 DCHECK(!discovery_session->IsActive()); | 154 DCHECK(!discovery_session->IsActive()); |
149 discovery_sessions_.erase(discovery_session); | 155 discovery_sessions_.erase(discovery_session); |
150 } | 156 } |
151 | 157 |
152 } // namespace device | 158 } // namespace device |
OLD | NEW |