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 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" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 private: | 84 private: |
85 // Property callback passed when we create Properties* structures. | 85 // Property callback passed when we create Properties* structures. |
86 void OnPropertyChanged(const std::string& property_name); | 86 void OnPropertyChanged(const std::string& property_name); |
87 | 87 |
88 // Posts the delayed task represented by |callback| onto the current | 88 // Posts the delayed task represented by |callback| onto the current |
89 // message loop to be executed after |simulation_interval_ms_| milliseconds. | 89 // message loop to be executed after |simulation_interval_ms_| milliseconds. |
90 void PostDelayedTask(const base::Closure& callback); | 90 void PostDelayedTask(const base::Closure& callback); |
91 | 91 |
92 // List of observers interested in event notifications from us. | 92 // List of observers interested in event notifications from us. |
93 ObserverList<Observer> observers_; | 93 base::ObserverList<Observer> observers_; |
94 | 94 |
95 // Static properties we return. | 95 // Static properties we return. |
96 scoped_ptr<Properties> properties_; | 96 scoped_ptr<Properties> properties_; |
97 scoped_ptr<Properties> second_properties_; | 97 scoped_ptr<Properties> second_properties_; |
98 | 98 |
99 // Whether the adapter and second adapter should be visible or not. | 99 // Whether the adapter and second adapter should be visible or not. |
100 bool visible_; | 100 bool visible_; |
101 bool second_visible_; | 101 bool second_visible_; |
102 | 102 |
103 // Number of times we've been asked to discover. | 103 // Number of times we've been asked to discover. |
104 int discovering_count_; | 104 int discovering_count_; |
105 | 105 |
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 chromeos |
117 | 117 |
118 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_ | 118 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_ADAPTER_CLIENT_H_ |
OLD | NEW |