Chromium Code Reviews| 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_NFC_PROPERTY_SET_H_ | 5 #ifndef CHROMEOS_DBUS_NFC_PROPERTY_SET_H_ |
| 6 #define CHROMEOS_DBUS_NFC_PROPERTY_SET_H_ | 6 #define CHROMEOS_DBUS_NFC_PROPERTY_SET_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 void Get(dbus::PropertyBase* property, GetCallback callback) override; | 38 void Get(dbus::PropertyBase* property, GetCallback callback) override; |
| 39 void GetAll() override; | 39 void GetAll() override; |
| 40 void OnGetAll(dbus::Response* response) override; | 40 void OnGetAll(dbus::Response* response) override; |
| 41 void Set(dbus::PropertyBase* property, SetCallback callback) override; | 41 void Set(dbus::PropertyBase* property, SetCallback callback) override; |
| 42 void ChangedReceived(dbus::Signal* signal) override; | 42 void ChangedReceived(dbus::Signal* signal) override; |
| 43 | 43 |
| 44 protected: | 44 protected: |
| 45 const base::Closure& on_get_all_callback() { return on_get_all_callback_; } | 45 const base::Closure& on_get_all_callback() { return on_get_all_callback_; } |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 void OnGetAllError(dbus::ErrorResponse* response); | |
| 49 | |
| 48 // Optional callback used to notify clients when all properties were received | 50 // Optional callback used to notify clients when all properties were received |
| 49 // after a call to GetAll. | 51 // after a call to GetAll. |
| 50 base::Closure on_get_all_callback_; | 52 base::Closure on_get_all_callback_; |
| 51 | 53 |
| 54 base::WeakPtrFactory<NfcPropertySet> weak_ptr_factory_; | |
|
stevenjb
2016/03/22 16:17:51
Instead of adding a second WeakPtrFactory to prote
hashimoto
2016/03/23 03:27:03
This WeakPtrFactory is needed to make a callback o
stevenjb
2016/03/23 04:03:33
Ugh. I see. Fair enough.
| |
| 55 | |
| 52 DISALLOW_COPY_AND_ASSIGN(NfcPropertySet); | 56 DISALLOW_COPY_AND_ASSIGN(NfcPropertySet); |
| 53 }; | 57 }; |
| 54 | 58 |
| 55 } // namespace chromeos | 59 } // namespace chromeos |
| 56 | 60 |
| 57 #endif // CHROMEOS_DBUS_NFC_PROPERTY_SET_H_ | 61 #endif // CHROMEOS_DBUS_NFC_PROPERTY_SET_H_ |
| OLD | NEW |