OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ |
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ | 6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // Each of these calls the equivalent | 29 // Each of these calls the equivalent |
30 // BluetoothAdvertisementServiceProvider::Delegate method on the object passed | 30 // BluetoothAdvertisementServiceProvider::Delegate method on the object passed |
31 // on construction. | 31 // on construction. |
32 void Release(); | 32 void Release(); |
33 | 33 |
34 const dbus::ObjectPath& object_path() { return object_path_; } | 34 const dbus::ObjectPath& object_path() { return object_path_; } |
35 | 35 |
36 private: | 36 private: |
37 friend class FakeBluetoothLEAdvertisingManagerClient; | 37 friend class FakeBluetoothLEAdvertisingManagerClient; |
38 | 38 |
39 // D-Bus object path we are faking. | |
40 dbus::ObjectPath object_path_; | |
41 | |
42 // All incoming method calls are passed on to the Delegate and a callback | 39 // All incoming method calls are passed on to the Delegate and a callback |
43 // passed to generate the reply. |delegate_| is generally the object that | 40 // passed to generate the reply. |delegate_| is generally the object that |
44 // owns this one, and must outlive it. | 41 // owns this one, and must outlive it. |
45 Delegate* delegate_; | 42 Delegate* delegate_; |
46 | 43 |
47 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisementServiceProvider); | 44 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisementServiceProvider); |
48 }; | 45 }; |
49 | 46 |
50 } // namespace chromeos | 47 } // namespace chromeos |
51 | 48 |
52 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ | 49 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ |
OLD | NEW |