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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 void OnOwnership(base::Callback<void(bool)> callback, | 105 void OnOwnership(base::Callback<void(bool)> callback, |
106 const std::string& service_name, | 106 const std::string& service_name, |
107 bool success); | 107 bool success); |
108 | 108 |
109 // Called when a method is exported. | 109 // Called when a method is exported. |
110 void OnExported(const std::string& interface_name, | 110 void OnExported(const std::string& interface_name, |
111 const std::string& method_name, | 111 const std::string& method_name, |
112 bool success); | 112 bool success); |
113 | 113 |
114 // base::Thread override. | 114 // base::Thread override. |
115 void Run(base::MessageLoop* message_loop) override; | 115 void Run(base::RunLoop* run_loop) override; |
116 | 116 |
117 // | 117 // |
118 // Exported methods. | 118 // Exported methods. |
119 // | 119 // |
120 | 120 |
121 // Echos the text message received from the method call. | 121 // Echos the text message received from the method call. |
122 void Echo(MethodCall* method_call, | 122 void Echo(MethodCall* method_call, |
123 dbus::ExportedObject::ResponseSender response_sender); | 123 dbus::ExportedObject::ResponseSender response_sender); |
124 | 124 |
125 // Echos the text message received from the method call, but sleeps for | 125 // Echos the text message received from the method call, but sleeps for |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 bool has_ownership_; | 224 bool has_ownership_; |
225 | 225 |
226 scoped_refptr<Bus> bus_; | 226 scoped_refptr<Bus> bus_; |
227 ExportedObject* exported_object_; | 227 ExportedObject* exported_object_; |
228 ExportedObject* exported_object_manager_; | 228 ExportedObject* exported_object_manager_; |
229 }; | 229 }; |
230 | 230 |
231 } // namespace dbus | 231 } // namespace dbus |
232 | 232 |
233 #endif // DBUS_TEST_SERVICE_H_ | 233 #endif // DBUS_TEST_SERVICE_H_ |
OLD | NEW |