| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chromeos/dbus/fake_bluetooth_device_client.h" | 5 #include "chromeos/dbus/fake_bluetooth_device_client.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 properties->paired.ReplaceValue(true); | 154 properties->paired.ReplaceValue(true); |
| 155 properties->trusted.ReplaceValue(true); | 155 properties->trusted.ReplaceValue(true); |
| 156 properties->adapter.ReplaceValue( | 156 properties->adapter.ReplaceValue( |
| 157 dbus::ObjectPath(FakeBluetoothAdapterClient::kAdapterPath)); | 157 dbus::ObjectPath(FakeBluetoothAdapterClient::kAdapterPath)); |
| 158 | 158 |
| 159 std::vector<std::string> uuids; | 159 std::vector<std::string> uuids; |
| 160 uuids.push_back("00001800-0000-1000-8000-00805f9b34fb"); | 160 uuids.push_back("00001800-0000-1000-8000-00805f9b34fb"); |
| 161 uuids.push_back("00001801-0000-1000-8000-00805f9b34fb"); | 161 uuids.push_back("00001801-0000-1000-8000-00805f9b34fb"); |
| 162 properties->uuids.ReplaceValue(uuids); | 162 properties->uuids.ReplaceValue(uuids); |
| 163 | 163 |
| 164 properties->modalias.ReplaceValue("usb:v05ACp030Dd0306"); |
| 165 |
| 164 properties_map_[dbus::ObjectPath(kPairedDevicePath)] = properties; | 166 properties_map_[dbus::ObjectPath(kPairedDevicePath)] = properties; |
| 165 device_list_.push_back(dbus::ObjectPath(kPairedDevicePath)); | 167 device_list_.push_back(dbus::ObjectPath(kPairedDevicePath)); |
| 166 } | 168 } |
| 167 | 169 |
| 168 FakeBluetoothDeviceClient::~FakeBluetoothDeviceClient() { | 170 FakeBluetoothDeviceClient::~FakeBluetoothDeviceClient() { |
| 169 // Clean up Properties structures | 171 // Clean up Properties structures |
| 170 STLDeleteValues(&properties_map_); | 172 STLDeleteValues(&properties_map_); |
| 171 } | 173 } |
| 172 | 174 |
| 173 void FakeBluetoothDeviceClient::AddObserver(Observer* observer) { | 175 void FakeBluetoothDeviceClient::AddObserver(Observer* observer) { |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 FROM_HERE, | 836 FROM_HERE, |
| 835 base::Bind(&FakeBluetoothDeviceClient::CompleteSimulatedPairing, | 837 base::Bind(&FakeBluetoothDeviceClient::CompleteSimulatedPairing, |
| 836 base::Unretained(this), | 838 base::Unretained(this), |
| 837 object_path, callback, error_callback), | 839 object_path, callback, error_callback), |
| 838 base::TimeDelta::FromMilliseconds(simulation_interval_ms_)); | 840 base::TimeDelta::FromMilliseconds(simulation_interval_ms_)); |
| 839 | 841 |
| 840 } | 842 } |
| 841 } | 843 } |
| 842 | 844 |
| 843 } // namespace chromeos | 845 } // namespace chromeos |
| OLD | NEW |