| 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_win.h" | 5 #include "device/bluetooth/bluetooth_adapter_win.h" |
| 6 | 6 |
| 7 #include <hash_set> | 7 #include <hash_set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 void BluetoothAdapterWin::AddObserver(BluetoothAdapter::Observer* observer) { | 38 void BluetoothAdapterWin::AddObserver(BluetoothAdapter::Observer* observer) { |
| 39 DCHECK(observer); | 39 DCHECK(observer); |
| 40 observers_.AddObserver(observer); | 40 observers_.AddObserver(observer); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void BluetoothAdapterWin::RemoveObserver(BluetoothAdapter::Observer* observer) { | 43 void BluetoothAdapterWin::RemoveObserver(BluetoothAdapter::Observer* observer) { |
| 44 DCHECK(observer); | 44 DCHECK(observer); |
| 45 observers_.RemoveObserver(observer); | 45 observers_.RemoveObserver(observer); |
| 46 } | 46 } |
| 47 | 47 |
| 48 std::string BluetoothAdapterWin::address() const { | 48 std::string BluetoothAdapterWin::GetAddress() const { |
| 49 return address_; | 49 return address_; |
| 50 } | 50 } |
| 51 | 51 |
| 52 std::string BluetoothAdapterWin::name() const { | 52 std::string BluetoothAdapterWin::GetName() const { |
| 53 return name_; | 53 return name_; |
| 54 } | 54 } |
| 55 | 55 |
| 56 // TODO(youngki): Return true when |task_manager_| initializes the adapter | 56 // TODO(youngki): Return true when |task_manager_| initializes the adapter |
| 57 // state. | 57 // state. |
| 58 bool BluetoothAdapterWin::IsInitialized() const { | 58 bool BluetoothAdapterWin::IsInitialized() const { |
| 59 return initialized_; | 59 return initialized_; |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool BluetoothAdapterWin::IsPresent() const { | 62 bool BluetoothAdapterWin::IsPresent() const { |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 num_discovery_listeners_ -= on_stop_discovery_callbacks_.size(); | 269 num_discovery_listeners_ -= on_stop_discovery_callbacks_.size(); |
| 270 on_stop_discovery_callbacks_.clear(); | 270 on_stop_discovery_callbacks_.clear(); |
| 271 return; | 271 return; |
| 272 } | 272 } |
| 273 | 273 |
| 274 discovery_status_ = DISCOVERY_STOPPING; | 274 discovery_status_ = DISCOVERY_STOPPING; |
| 275 task_manager_->PostStopDiscoveryTask(); | 275 task_manager_->PostStopDiscoveryTask(); |
| 276 } | 276 } |
| 277 | 277 |
| 278 } // namespace device | 278 } // namespace device |
| OLD | NEW |