Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: dbus/object_proxy.h

Issue 2299853002: dbus: Rewrite ObjectProxy::CallMethodWithErrorCallback's comment (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_OBJECT_PROXY_H_ 5 #ifndef DBUS_OBJECT_PROXY_H_
6 #define DBUS_OBJECT_PROXY_H_ 6 #define DBUS_OBJECT_PROXY_H_
7 7
8 #include <dbus/dbus.h> 8 #include <dbus/dbus.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // Requests to call the method of the remote object. 131 // Requests to call the method of the remote object.
132 // 132 //
133 // |callback| and |error_callback| will be called in the origin thread, once 133 // |callback| and |error_callback| will be called in the origin thread, once
134 // the method call is complete. As it's called in the origin thread, 134 // the method call is complete. As it's called in the origin thread,
135 // |callback| can safely reference objects in the origin thread (i.e. 135 // |callback| can safely reference objects in the origin thread (i.e.
136 // UI thread in most cases). If the caller is not interested in the response 136 // UI thread in most cases). If the caller is not interested in the response
137 // from the method (i.e. calling a method that does not return a value), 137 // from the method (i.e. calling a method that does not return a value),
138 // EmptyResponseCallback() can be passed to the |callback| parameter. 138 // EmptyResponseCallback() can be passed to the |callback| parameter.
139 // 139 //
140 // If the method call is successful, a pointer to Response object will 140 // If the method call is successful, |callback| will be invoked with a
141 // be passed to the callback. If unsuccessful, the error callback will be 141 // Response object. If unsuccessful, |error_callback| will be invoked with an
142 // called and a pointer to ErrorResponse object will be passed to the error 142 // ErrorResponse object (if the remote object returned an error) or nullptr
143 // callback if available, otherwise NULL will be passed. 143 // (if a response was not received at all).
144 // 144 //
145 // Must be called in the origin thread. 145 // Must be called in the origin thread.
146 virtual void CallMethodWithErrorCallback(MethodCall* method_call, 146 virtual void CallMethodWithErrorCallback(MethodCall* method_call,
147 int timeout_ms, 147 int timeout_ms,
148 ResponseCallback callback, 148 ResponseCallback callback,
149 ErrorCallback error_callback); 149 ErrorCallback error_callback);
150 150
151 // Requests to connect to the signal from the remote object. 151 // Requests to connect to the signal from the remote object.
152 // 152 //
153 // |signal_callback| will be called in the origin thread, when the 153 // |signal_callback| will be called in the origin thread, when the
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 std::string service_name_owner_; 328 std::string service_name_owner_;
329 329
330 std::set<DBusPendingCall*> pending_calls_; 330 std::set<DBusPendingCall*> pending_calls_;
331 331
332 DISALLOW_COPY_AND_ASSIGN(ObjectProxy); 332 DISALLOW_COPY_AND_ASSIGN(ObjectProxy);
333 }; 333 };
334 334
335 } // namespace dbus 335 } // namespace dbus
336 336
337 #endif // DBUS_OBJECT_PROXY_H_ 337 #endif // DBUS_OBJECT_PROXY_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698