Chromium Code Reviews| 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 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
| 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/containers/scoped_ptr_map.h" | |
| 14 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 15 #include "dbus/object_path.h" | 14 #include "dbus/object_path.h" |
| 16 #include "dbus/property.h" | 15 #include "dbus/property.h" |
| 17 #include "device/bluetooth/bluetooth_export.h" | 16 #include "device/bluetooth/bluetooth_export.h" |
| 18 #include "device/bluetooth/dbus/bluetooth_agent_service_provider.h" | 17 #include "device/bluetooth/dbus/bluetooth_agent_service_provider.h" |
| 19 #include "device/bluetooth/dbus/bluetooth_device_client.h" | 18 #include "device/bluetooth/dbus/bluetooth_device_client.h" |
| 20 #include "device/bluetooth/dbus/bluetooth_profile_service_provider.h" | 19 #include "device/bluetooth/dbus/bluetooth_profile_service_provider.h" |
| 21 | 20 |
| 22 namespace bluez { | 21 namespace bluez { |
| 23 | 22 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 void DisconnectionCallback( | 289 void DisconnectionCallback( |
| 291 const dbus::ObjectPath& object_path, | 290 const dbus::ObjectPath& object_path, |
| 292 const base::Closure& callback, | 291 const base::Closure& callback, |
| 293 const ErrorCallback& error_callback, | 292 const ErrorCallback& error_callback, |
| 294 BluetoothProfileServiceProvider::Delegate::Status status); | 293 BluetoothProfileServiceProvider::Delegate::Status status); |
| 295 | 294 |
| 296 // List of observers interested in event notifications from us. | 295 // List of observers interested in event notifications from us. |
| 297 base::ObserverList<Observer> observers_; | 296 base::ObserverList<Observer> observers_; |
| 298 | 297 |
| 299 using PropertiesMap = | 298 using PropertiesMap = |
| 300 base::ScopedPtrMap<const dbus::ObjectPath, scoped_ptr<Properties>>; | 299 std::map<const dbus::ObjectPath, scoped_ptr<Properties>>; |
| 301 PropertiesMap properties_map_; | 300 PropertiesMap properties_map_; |
| 302 std::vector<dbus::ObjectPath> device_list_; | 301 std::vector<dbus::ObjectPath> device_list_; |
| 303 | 302 |
| 304 // Properties which are used to decied which method of pairing should | 303 // Properties which are used to decied which method of pairing should |
| 305 // be done on request. | 304 // be done on request. |
| 306 using PairingOptionsMap = | 305 using PairingOptionsMap = |
| 307 base::ScopedPtrMap<const dbus::ObjectPath, | 306 std::map<const dbus::ObjectPath, scoped_ptr<SimulatedPairingOptions>>; |
| 308 scoped_ptr<SimulatedPairingOptions>>; | |
| 309 PairingOptionsMap pairing_options_map_; | 307 PairingOptionsMap pairing_options_map_; |
|
vmpstr
2015/12/02 00:09:36
This one might need the DISALLOW_COPY_AND_ASSIGN (
Nico
2015/12/02 02:09:09
dbus/ is probably not built on windows
| |
| 310 | 308 |
| 311 int simulation_interval_ms_; | 309 int simulation_interval_ms_; |
| 312 uint32_t discovery_simulation_step_; | 310 uint32_t discovery_simulation_step_; |
| 313 uint32_t incoming_pairing_simulation_step_; | 311 uint32_t incoming_pairing_simulation_step_; |
| 314 bool pairing_cancelled_; | 312 bool pairing_cancelled_; |
| 315 | 313 |
| 316 int16 connection_rssi_; | 314 int16 connection_rssi_; |
| 317 int16 transmit_power_; | 315 int16 transmit_power_; |
| 318 int16 max_transmit_power_; | 316 int16 max_transmit_power_; |
| 319 | 317 |
| 320 // Controls the fake behavior to allow more extensive UI testing without | 318 // Controls the fake behavior to allow more extensive UI testing without |
| 321 // having to cycle the discovery simulation. | 319 // having to cycle the discovery simulation. |
| 322 bool delay_start_discovery_; | 320 bool delay_start_discovery_; |
| 323 }; | 321 }; |
| 324 | 322 |
| 325 } // namespace bluez | 323 } // namespace bluez |
| 326 | 324 |
| 327 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 325 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
| OLD | NEW |