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_SHILL_SERVICE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_SHILL_SERVICE_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_SHILL_SERVICE_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_SHILL_SERVICE_CLIENT_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/chromeos_export.h" | 14 #include "chromeos/chromeos_export.h" |
15 #include "chromeos/dbus/shill_service_client.h" | 15 #include "chromeos/dbus/shill_service_client.h" |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 | 18 |
19 // A fake implementation of ShillServiceClient. This works in close coordination | 19 // A fake implementation of ShillServiceClient. This works in close coordination |
20 // with FakeShillManagerClient and is not intended to be used independently. | 20 // with FakeShillManagerClient and is not intended to be used independently. |
21 class CHROMEOS_EXPORT FakeShillServiceClient : | 21 class CHROMEOS_EXPORT FakeShillServiceClient |
22 public ShillServiceClient, | 22 : public ShillServiceClient, |
23 public ShillServiceClient::TestInterface { | 23 public ShillServiceClient::TestInterface { |
24 public: | 24 public: |
25 FakeShillServiceClient(); | 25 FakeShillServiceClient(); |
26 virtual ~FakeShillServiceClient(); | 26 virtual ~FakeShillServiceClient(); |
27 | 27 |
28 // ShillServiceClient overrides | 28 // ShillServiceClient overrides |
29 virtual void Init(dbus::Bus* bus) OVERRIDE; | 29 virtual void Init(dbus::Bus* bus) OVERRIDE; |
30 virtual void AddPropertyChangedObserver( | 30 virtual void AddPropertyChangedObserver( |
31 const dbus::ObjectPath& service_path, | 31 const dbus::ObjectPath& service_path, |
32 ShillPropertyChangedObserver* observer) OVERRIDE; | 32 ShillPropertyChangedObserver* observer) OVERRIDE; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // Note: This should remain the last member so it'll be destroyed and | 126 // Note: This should remain the last member so it'll be destroyed and |
127 // invalidate its weak pointers before any other members are destroyed. | 127 // invalidate its weak pointers before any other members are destroyed. |
128 base::WeakPtrFactory<FakeShillServiceClient> weak_ptr_factory_; | 128 base::WeakPtrFactory<FakeShillServiceClient> weak_ptr_factory_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(FakeShillServiceClient); | 130 DISALLOW_COPY_AND_ASSIGN(FakeShillServiceClient); |
131 }; | 131 }; |
132 | 132 |
133 } // namespace chromeos | 133 } // namespace chromeos |
134 | 134 |
135 #endif // CHROMEOS_DBUS_FAKE_SHILL_SERVICE_CLIENT_H_ | 135 #endif // CHROMEOS_DBUS_FAKE_SHILL_SERVICE_CLIENT_H_ |
OLD | NEW |