Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: device/bluetooth/dbus/fake_bluetooth_adapter_client.h

Issue 1347193004: Refactor DBusThreadManager to split away BT clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CHROMEOS_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_ 6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "chromeos/chromeos_export.h"
14 #include "chromeos/dbus/bluetooth_adapter_client.h"
15 #include "dbus/object_path.h" 13 #include "dbus/object_path.h"
16 #include "dbus/property.h" 14 #include "dbus/property.h"
15 #include "device/bluetooth/bluetooth_export.h"
16 #include "device/bluetooth/dbus/bluetooth_adapter_client.h"
17 17
18 namespace chromeos { 18 namespace bluez {
19 19
20 // FakeBluetoothAdapterClient simulates the behavior of the Bluetooth Daemon 20 // FakeBluetoothAdapterClient simulates the behavior of the Bluetooth Daemon
21 // adapter objects and is used both in test cases in place of a mock and on 21 // adapter objects and is used both in test cases in place of a mock and on
22 // the Linux desktop. 22 // the Linux desktop.
23 class CHROMEOS_EXPORT FakeBluetoothAdapterClient 23 class DEVICE_BLUETOOTH_EXPORT FakeBluetoothAdapterClient
24 : public BluetoothAdapterClient { 24 : public BluetoothAdapterClient {
25 public: 25 public:
26 struct Properties : public BluetoothAdapterClient::Properties { 26 struct Properties : public BluetoothAdapterClient::Properties {
27 explicit Properties(const PropertyChangedCallback& callback); 27 explicit Properties(const PropertyChangedCallback& callback);
28 ~Properties() override; 28 ~Properties() override;
29 29
30 // dbus::PropertySet override 30 // dbus::PropertySet override
31 void Get(dbus::PropertyBase* property, 31 void Get(dbus::PropertyBase* property,
32 dbus::PropertySet::GetCallback callback) override; 32 dbus::PropertySet::GetCallback callback) override;
33 void GetAll() override; 33 void GetAll() override;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Current discovery filter 106 // Current discovery filter
107 scoped_ptr<DiscoveryFilter> discovery_filter_; 107 scoped_ptr<DiscoveryFilter> discovery_filter_;
108 108
109 // When set, next call to SetDiscoveryFilter would fail. 109 // When set, next call to SetDiscoveryFilter would fail.
110 bool set_discovery_filter_should_fail_; 110 bool set_discovery_filter_should_fail_;
111 111
112 // Current timeout interval used when posting delayed tasks. 112 // Current timeout interval used when posting delayed tasks.
113 int simulation_interval_ms_; 113 int simulation_interval_ms_;
114 }; 114 };
115 115
116 } // namespace chromeos 116 } // namespace bluez
117 117
118 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_ 118 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_
OLDNEW
« no previous file with comments | « device/bluetooth/dbus/bluez_dbus_manager.cc ('k') | device/bluetooth/dbus/fake_bluetooth_adapter_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698