OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_mac.h" | 5 #include "device/bluetooth/bluetooth_adapter_mac.h" |
6 | 6 |
7 #import <IOBluetooth/objc/IOBluetoothDeviceInquiry.h> | 7 #import <IOBluetooth/objc/IOBluetoothDeviceInquiry.h> |
8 #import <IOBluetooth/objc/IOBluetoothDevice.h> | 8 #import <IOBluetooth/objc/IOBluetoothDevice.h> |
9 #import <IOBluetooth/objc/IOBluetoothHostController.h> | 9 #import <IOBluetooth/objc/IOBluetoothHostController.h> |
10 | 10 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 void BluetoothAdapterMac::AddObserver(BluetoothAdapter::Observer* observer) { | 110 void BluetoothAdapterMac::AddObserver(BluetoothAdapter::Observer* observer) { |
111 DCHECK(observer); | 111 DCHECK(observer); |
112 observers_.AddObserver(observer); | 112 observers_.AddObserver(observer); |
113 } | 113 } |
114 | 114 |
115 void BluetoothAdapterMac::RemoveObserver(BluetoothAdapter::Observer* observer) { | 115 void BluetoothAdapterMac::RemoveObserver(BluetoothAdapter::Observer* observer) { |
116 DCHECK(observer); | 116 DCHECK(observer); |
117 observers_.RemoveObserver(observer); | 117 observers_.RemoveObserver(observer); |
118 } | 118 } |
119 | 119 |
120 std::string BluetoothAdapterMac::address() const { | 120 std::string BluetoothAdapterMac::GetAddress() const { |
121 return address_; | 121 return address_; |
122 } | 122 } |
123 | 123 |
124 std::string BluetoothAdapterMac::name() const { | 124 std::string BluetoothAdapterMac::GetName() const { |
125 return name_; | 125 return name_; |
126 } | 126 } |
127 | 127 |
128 bool BluetoothAdapterMac::IsInitialized() const { | 128 bool BluetoothAdapterMac::IsInitialized() const { |
129 return true; | 129 return true; |
130 } | 130 } |
131 | 131 |
132 bool BluetoothAdapterMac::IsPresent() const { | 132 bool BluetoothAdapterMac::IsPresent() const { |
133 return !address_.empty(); | 133 return !address_.empty(); |
134 } | 134 } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 iter != callback_list.end(); | 360 iter != callback_list.end(); |
361 ++iter) { | 361 ++iter) { |
362 if (success) | 362 if (success) |
363 ui_task_runner_->PostTask(FROM_HERE, iter->first); | 363 ui_task_runner_->PostTask(FROM_HERE, iter->first); |
364 else | 364 else |
365 ui_task_runner_->PostTask(FROM_HERE, iter->second); | 365 ui_task_runner_->PostTask(FROM_HERE, iter->second); |
366 } | 366 } |
367 } | 367 } |
368 | 368 |
369 } // namespace device | 369 } // namespace device |
OLD | NEW |