OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 DBUS_TEST_SERVICE_H_ | 5 #ifndef DBUS_TEST_SERVICE_H_ |
6 #define DBUS_TEST_SERVICE_H_ | 6 #define DBUS_TEST_SERVICE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void OnOwnership(base::Callback<void(bool)> callback, | 92 void OnOwnership(base::Callback<void(bool)> callback, |
93 const std::string& service_name, | 93 const std::string& service_name, |
94 bool success); | 94 bool success); |
95 | 95 |
96 // Called when a method is exported. | 96 // Called when a method is exported. |
97 void OnExported(const std::string& interface_name, | 97 void OnExported(const std::string& interface_name, |
98 const std::string& method_name, | 98 const std::string& method_name, |
99 bool success); | 99 bool success); |
100 | 100 |
101 // base::Thread override. | 101 // base::Thread override. |
102 virtual void Run(MessageLoop* message_loop) OVERRIDE; | 102 virtual void Run(base::MessageLoop* message_loop) OVERRIDE; |
103 | 103 |
104 // | 104 // |
105 // Exported methods. | 105 // Exported methods. |
106 // | 106 // |
107 | 107 |
108 // Echos the text message received from the method call. | 108 // Echos the text message received from the method call. |
109 void Echo(MethodCall* method_call, | 109 void Echo(MethodCall* method_call, |
110 dbus::ExportedObject::ResponseSender response_sender); | 110 dbus::ExportedObject::ResponseSender response_sender); |
111 | 111 |
112 // Echos the text message received from the method call, but sleeps for | 112 // Echos the text message received from the method call, but sleeps for |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 bool has_ownership_; | 172 bool has_ownership_; |
173 | 173 |
174 scoped_refptr<Bus> bus_; | 174 scoped_refptr<Bus> bus_; |
175 ExportedObject* exported_object_; | 175 ExportedObject* exported_object_; |
176 ExportedObject* exported_object_manager_; | 176 ExportedObject* exported_object_manager_; |
177 }; | 177 }; |
178 | 178 |
179 } // namespace dbus | 179 } // namespace dbus |
180 | 180 |
181 #endif // DBUS_TEST_SERVICE_H_ | 181 #endif // DBUS_TEST_SERVICE_H_ |
OLD | NEW |