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

Side by Side Diff: dbus/bus.h

Issue 8682032: Revert 111479 - chrome: dbus: support asynchronous method replies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BUS_H_ 5 #ifndef DBUS_BUS_H_
6 #define DBUS_BUS_H_ 6 #define DBUS_BUS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // if (!response) 93 // if (!response)
94 // return; 94 // return;
95 // } 95 // }
96 // 96 //
97 // ... 97 // ...
98 // object_proxy.CallMethod(&method_call, timeout_ms, 98 // object_proxy.CallMethod(&method_call, timeout_ms,
99 // base::Bind(&OnResponse)); 99 // base::Bind(&OnResponse));
100 // 100 //
101 // Exporting a method: 101 // Exporting a method:
102 // 102 //
103 // void Echo(dbus::MethodCall* method_call, 103 // Response* Echo(dbus::MethodCall* method_call) {
104 // dbus::ExportedObject::ResponseSender response_sender) {
105 // // Do something with method_call. 104 // // Do something with method_call.
106 // Response* response = Response::FromMethodCall(method_call); 105 // Response* response = Response::FromMethodCall(method_call);
107 // // Build response here. 106 // // Build response here.
108 // // Can send an immediate response here to implement a synchronous service 107 // return response;
109 // // or store the response_sender and send a response later to implement an
110 // // asynchronous service.
111 // response_sender.Run(response);
112 // } 108 // }
113 // 109 //
114 // void OnExported(const std::string& interface_name, 110 // void OnExported(const std::string& interface_name,
115 // const std::string& object_path, 111 // const std::string& object_path,
116 // bool success) { 112 // bool success) {
117 // // success is true if the method was exported successfully. 113 // // success is true if the method was exported successfully.
118 // } 114 // }
119 // 115 //
120 // ... 116 // ...
121 // dbus::ExportedObject* exported_object = 117 // dbus::ExportedObject* exported_object =
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 // OnAddTimeout()/OnRemoveTimeou() are balanced. 475 // OnAddTimeout()/OnRemoveTimeou() are balanced.
480 int num_pending_watches_; 476 int num_pending_watches_;
481 int num_pending_timeouts_; 477 int num_pending_timeouts_;
482 478
483 DISALLOW_COPY_AND_ASSIGN(Bus); 479 DISALLOW_COPY_AND_ASSIGN(Bus);
484 }; 480 };
485 481
486 } // namespace dbus 482 } // namespace dbus
487 483
488 #endif // DBUS_BUS_H_ 484 #endif // DBUS_BUS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc ('k') | dbus/end_to_end_async_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698