| 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_device_win.h" | 5 #include "device/bluetooth/bluetooth_device_win.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 BluetoothDeviceWin::~BluetoothDeviceWin() { | 57 BluetoothDeviceWin::~BluetoothDeviceWin() { |
| 58 } | 58 } |
| 59 | 59 |
| 60 void BluetoothDeviceWin::SetVisible(bool visible) { | 60 void BluetoothDeviceWin::SetVisible(bool visible) { |
| 61 visible_ = visible; | 61 visible_ = visible; |
| 62 } | 62 } |
| 63 | 63 |
| 64 void BluetoothDeviceWin::AddObserver( | |
| 65 device::BluetoothDevice::Observer* observer) { | |
| 66 DCHECK(observer); | |
| 67 observers_.AddObserver(observer); | |
| 68 } | |
| 69 | |
| 70 void BluetoothDeviceWin::RemoveObserver( | |
| 71 device::BluetoothDevice::Observer* observer) { | |
| 72 DCHECK(observer); | |
| 73 observers_.RemoveObserver(observer); | |
| 74 } | |
| 75 | |
| 76 | |
| 77 uint32 BluetoothDeviceWin::GetBluetoothClass() const { | 64 uint32 BluetoothDeviceWin::GetBluetoothClass() const { |
| 78 return bluetooth_class_; | 65 return bluetooth_class_; |
| 79 } | 66 } |
| 80 | 67 |
| 81 std::string BluetoothDeviceWin::GetDeviceName() const { | 68 std::string BluetoothDeviceWin::GetDeviceName() const { |
| 82 return name_; | 69 return name_; |
| 83 } | 70 } |
| 84 | 71 |
| 85 std::string BluetoothDeviceWin::GetAddress() const { | 72 std::string BluetoothDeviceWin::GetAddress() const { |
| 86 return address_; | 73 return address_; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); | 205 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); |
| 219 iter != service_record_list_.end(); | 206 iter != service_record_list_.end(); |
| 220 ++iter) { | 207 ++iter) { |
| 221 if ((*iter)->uuid() == uuid) | 208 if ((*iter)->uuid() == uuid) |
| 222 return *iter; | 209 return *iter; |
| 223 } | 210 } |
| 224 return NULL; | 211 return NULL; |
| 225 } | 212 } |
| 226 | 213 |
| 227 } // namespace device | 214 } // namespace device |
| OLD | NEW |