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

Unified Diff: mojo/public/cpp/bindings/lib/router.h

Issue 1055703002: Gather trace data by waiting on handles with a fixed timeout (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: review feedback Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/lib/router.h
diff --git a/mojo/public/cpp/bindings/lib/router.h b/mojo/public/cpp/bindings/lib/router.h
index 86b889796bcbfcad3c6b09aaf40956eb1f648ec9..cc67b3b8a9cbe8cbb5b3670fd85596316514fba2 100644
--- a/mojo/public/cpp/bindings/lib/router.h
+++ b/mojo/public/cpp/bindings/lib/router.h
@@ -52,9 +52,11 @@ class Router : public MessageReceiverWithResponder {
bool AcceptWithResponder(Message* message,
MessageReceiver* responder) override;
- // Blocks the current thread for the first incoming method call, i.e., either
- // a call to a client method or a callback method.
- bool WaitForIncomingMessage() { return connector_.WaitForIncomingMessage(); }
+ // Blocks the current thread until the first incoming method call, i.e.,
+ // either a call to a client method or a callback method, or |deadline|.
+ bool WaitForIncomingMessage(MojoDeadline deadline) {
+ return connector_.WaitForIncomingMessage(deadline);
+ }
// Sets this object to testing mode.
// In testing mode:
@@ -63,6 +65,8 @@ class Router : public MessageReceiverWithResponder {
// receiver.
void EnableTestingMode();
+ MessagePipeHandle handle() const { return connector_.handle(); }
+
private:
typedef std::map<uint64_t, MessageReceiver*> ResponderMap;
« no previous file with comments | « mojo/public/cpp/bindings/lib/interface_ptr_internal.h ('k') | mojo/public/cpp/bindings/tests/connector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698