| 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_SHILL_SERVICE_CLIENT_STUB_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ |
| 6 #define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ | 6 #define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "chromeos/dbus/shill_service_client.h" | 14 #include "chromeos/dbus/shill_service_client.h" |
| 15 | 15 |
| 16 namespace chromeos { | 16 namespace chromeos { |
| 17 | 17 |
| 18 // A stub implementation of ShillServiceClient. | 18 // A stub implementation of ShillServiceClient. This works in close coordination |
| 19 // with ShillManagerClientStub and is not intended to be used independently. |
| 19 class ShillServiceClientStub : public ShillServiceClient, | 20 class ShillServiceClientStub : public ShillServiceClient, |
| 20 public ShillServiceClient::TestInterface { | 21 public ShillServiceClient::TestInterface { |
| 21 public: | 22 public: |
| 22 ShillServiceClientStub(); | 23 ShillServiceClientStub(); |
| 23 virtual ~ShillServiceClientStub(); | 24 virtual ~ShillServiceClientStub(); |
| 24 | 25 |
| 25 // ShillServiceClient overrides. | 26 // ShillServiceClient overrides. |
| 26 virtual void AddPropertyChangedObserver( | 27 virtual void AddPropertyChangedObserver( |
| 27 const dbus::ObjectPath& service_path, | 28 const dbus::ObjectPath& service_path, |
| 28 ShillPropertyChangedObserver* observer) OVERRIDE; | 29 ShillPropertyChangedObserver* observer) OVERRIDE; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // Note: This should remain the last member so it'll be destroyed and | 105 // Note: This should remain the last member so it'll be destroyed and |
| 105 // invalidate its weak pointers before any other members are destroyed. | 106 // invalidate its weak pointers before any other members are destroyed. |
| 106 base::WeakPtrFactory<ShillServiceClientStub> weak_ptr_factory_; | 107 base::WeakPtrFactory<ShillServiceClientStub> weak_ptr_factory_; |
| 107 | 108 |
| 108 DISALLOW_COPY_AND_ASSIGN(ShillServiceClientStub); | 109 DISALLOW_COPY_AND_ASSIGN(ShillServiceClientStub); |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 } // namespace chromeos | 112 } // namespace chromeos |
| 112 | 113 |
| 113 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ | 114 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ |
| OLD | NEW |