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_DEVICE_CLIENT_STUB_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_STUB_H_ |
6 #define CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_STUB_H_ | 6 #define CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_STUB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 // ShillDeviceClient::TestInterface overrides. | 81 // ShillDeviceClient::TestInterface overrides. |
82 virtual void AddDevice(const std::string& device_path, | 82 virtual void AddDevice(const std::string& device_path, |
83 const std::string& type, | 83 const std::string& type, |
84 const std::string& object_path) OVERRIDE; | 84 const std::string& object_path) OVERRIDE; |
85 virtual void RemoveDevice(const std::string& device_path) OVERRIDE; | 85 virtual void RemoveDevice(const std::string& device_path) OVERRIDE; |
86 virtual void ClearDevices() OVERRIDE; | 86 virtual void ClearDevices() OVERRIDE; |
87 virtual void SetDeviceProperty(const std::string& device_path, | 87 virtual void SetDeviceProperty(const std::string& device_path, |
88 const std::string& name, | 88 const std::string& name, |
89 const base::Value& value) OVERRIDE; | 89 const base::Value& value) OVERRIDE; |
| 90 virtual std::string GetDevicePathForType(const std::string& type) OVERRIDE; |
90 | 91 |
91 private: | 92 private: |
92 typedef ObserverList<ShillPropertyChangedObserver> PropertyObserverList; | 93 typedef ObserverList<ShillPropertyChangedObserver> PropertyObserverList; |
93 | 94 |
94 void SetDefaultProperties(); | 95 void SetDefaultProperties(); |
95 void PassStubDeviceProperties(const dbus::ObjectPath& device_path, | 96 void PassStubDeviceProperties(const dbus::ObjectPath& device_path, |
96 const DictionaryValueCallback& callback) const; | 97 const DictionaryValueCallback& callback) const; |
97 | 98 |
98 // Posts a task to run a void callback with status code |status|. | 99 // Posts a task to run a void callback with status code |status|. |
99 void PostVoidCallback(const VoidDBusMethodCallback& callback, | 100 void PostVoidCallback(const VoidDBusMethodCallback& callback, |
(...skipping 12 matching lines...) Expand all Loading... |
112 // Note: This should remain the last member so it'll be destroyed and | 113 // Note: This should remain the last member so it'll be destroyed and |
113 // invalidate its weak pointers before any other members are destroyed. | 114 // invalidate its weak pointers before any other members are destroyed. |
114 base::WeakPtrFactory<ShillDeviceClientStub> weak_ptr_factory_; | 115 base::WeakPtrFactory<ShillDeviceClientStub> weak_ptr_factory_; |
115 | 116 |
116 DISALLOW_COPY_AND_ASSIGN(ShillDeviceClientStub); | 117 DISALLOW_COPY_AND_ASSIGN(ShillDeviceClientStub); |
117 }; | 118 }; |
118 | 119 |
119 } // namespace chromeos | 120 } // namespace chromeos |
120 | 121 |
121 #endif // CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_STUB_H_ | 122 #endif // CHROMEOS_DBUS_SHILL_DEVICE_CLIENT_STUB_H_ |
OLD | NEW |