| 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/chromeos_export.h" |
| 14 #include "chromeos/dbus/shill_service_client.h" | 15 #include "chromeos/dbus/shill_service_client.h" |
| 15 | 16 |
| 16 namespace chromeos { | 17 namespace chromeos { |
| 17 | 18 |
| 18 // A stub implementation of ShillServiceClient. This works in close coordination | 19 // A stub implementation of ShillServiceClient. This works in close coordination |
| 19 // with ShillManagerClientStub and is not intended to be used independently. | 20 // with ShillManagerClientStub and is not intended to be used independently. |
| 20 class ShillServiceClientStub : public ShillServiceClient, | 21 class ShillServiceClientStub : public ShillServiceClient, |
| 21 public ShillServiceClient::TestInterface { | 22 public ShillServiceClient::TestInterface { |
| 22 public: | 23 public: |
| 23 ShillServiceClientStub(); | 24 ShillServiceClientStub(); |
| 24 virtual ~ShillServiceClientStub(); | 25 virtual ~ShillServiceClientStub(); |
| 25 | 26 |
| 27 // Returns true when stub portalled wifi is enabled and it's service |
| 28 // path equals to |path|. |
| 29 CHROMEOS_EXPORT static bool IsStubPortalledWifiEnabled( |
| 30 const std::string& path); |
| 31 |
| 26 // ShillServiceClient overrides. | 32 // ShillServiceClient overrides. |
| 27 virtual void AddPropertyChangedObserver( | 33 virtual void AddPropertyChangedObserver( |
| 28 const dbus::ObjectPath& service_path, | 34 const dbus::ObjectPath& service_path, |
| 29 ShillPropertyChangedObserver* observer) OVERRIDE; | 35 ShillPropertyChangedObserver* observer) OVERRIDE; |
| 30 virtual void RemovePropertyChangedObserver( | 36 virtual void RemovePropertyChangedObserver( |
| 31 const dbus::ObjectPath& service_path, | 37 const dbus::ObjectPath& service_path, |
| 32 ShillPropertyChangedObserver* observer) OVERRIDE; | 38 ShillPropertyChangedObserver* observer) OVERRIDE; |
| 33 virtual void GetProperties(const dbus::ObjectPath& service_path, | 39 virtual void GetProperties(const dbus::ObjectPath& service_path, |
| 34 const DictionaryValueCallback& callback) OVERRIDE; | 40 const DictionaryValueCallback& callback) OVERRIDE; |
| 35 virtual void SetProperty(const dbus::ObjectPath& service_path, | 41 virtual void SetProperty(const dbus::ObjectPath& service_path, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // Note: This should remain the last member so it'll be destroyed and | 121 // Note: This should remain the last member so it'll be destroyed and |
| 116 // invalidate its weak pointers before any other members are destroyed. | 122 // invalidate its weak pointers before any other members are destroyed. |
| 117 base::WeakPtrFactory<ShillServiceClientStub> weak_ptr_factory_; | 123 base::WeakPtrFactory<ShillServiceClientStub> weak_ptr_factory_; |
| 118 | 124 |
| 119 DISALLOW_COPY_AND_ASSIGN(ShillServiceClientStub); | 125 DISALLOW_COPY_AND_ASSIGN(ShillServiceClientStub); |
| 120 }; | 126 }; |
| 121 | 127 |
| 122 } // namespace chromeos | 128 } // namespace chromeos |
| 123 | 129 |
| 124 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ | 130 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ |
| OLD | NEW |