OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_NFC_DEVICE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "chromeos/chromeos_export.h" | 10 #include "chromeos/chromeos_export.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // record push after |record_push_delay| seconds. Posted by BeginPairing(). | 99 // record push after |record_push_delay| seconds. Posted by BeginPairing(). |
100 void MakeDeviceVisible(int record_push_delay); | 100 void MakeDeviceVisible(int record_push_delay); |
101 | 101 |
102 // Makes the fake records visible. Called by MakeDeviceVisible(). | 102 // Makes the fake records visible. Called by MakeDeviceVisible(). |
103 void MakeRecordsVisible(); | 103 void MakeRecordsVisible(); |
104 | 104 |
105 // Called when the simulation timeout expires. | 105 // Called when the simulation timeout expires. |
106 void HandleSimulationTimeout(); | 106 void HandleSimulationTimeout(); |
107 | 107 |
108 // List of observers interested in event notifications from us. | 108 // List of observers interested in event notifications from us. |
109 ObserverList<Observer> observers_; | 109 base::ObserverList<Observer> observers_; |
110 | 110 |
111 // Fake properties that are returned for the emulated device. | 111 // Fake properties that are returned for the emulated device. |
112 scoped_ptr<Properties> properties_; | 112 scoped_ptr<Properties> properties_; |
113 | 113 |
114 // If true, a pairing simulation was started using BeginPairing() and no call | 114 // If true, a pairing simulation was started using BeginPairing() and no call |
115 // to EndPairing() has been made. | 115 // to EndPairing() has been made. |
116 bool pairing_started_; | 116 bool pairing_started_; |
117 | 117 |
118 // If true, observers have been notified that a device has been created and | 118 // If true, observers have been notified that a device has been created and |
119 // the device properties are accessible. | 119 // the device properties are accessible. |
120 bool device_visible_; | 120 bool device_visible_; |
121 | 121 |
122 // If non-negative, the device will disappear this many milliseconds after | 122 // If non-negative, the device will disappear this many milliseconds after |
123 // its records have been exposed. | 123 // its records have been exposed. |
124 int simulation_timeout_; | 124 int simulation_timeout_; |
125 | 125 |
126 DISALLOW_COPY_AND_ASSIGN(FakeNfcDeviceClient); | 126 DISALLOW_COPY_AND_ASSIGN(FakeNfcDeviceClient); |
127 }; | 127 }; |
128 | 128 |
129 } // namespace chromeos | 129 } // namespace chromeos |
130 | 130 |
131 #endif // CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_ | 131 #endif // CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_ |
OLD | NEW |