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

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

Issue 2056153002: Convert PageLoadMetrics to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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
« no previous file with comments | « ipc/ipc_message_start.h ('k') | mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/interface_ptr_state.h
diff --git a/mojo/public/cpp/bindings/lib/interface_ptr_state.h b/mojo/public/cpp/bindings/lib/interface_ptr_state.h
index 584933ebc91b417c96c1cbdaf3e532819f8067ca..215e9001e6e224037bf82abcc98fbc4378c4e538 100644
--- a/mojo/public/cpp/bindings/lib/interface_ptr_state.h
+++ b/mojo/public/cpp/bindings/lib/interface_ptr_state.h
@@ -93,13 +93,8 @@ class InterfacePtrState<Interface, false> {
swap(other->version_, version_);
}
- void Bind(InterfacePtrInfo<Interface> info,
- scoped_refptr<base::SingleThreadTaskRunner> runner) {
- DCHECK(!proxy_);
- DCHECK(!router_);
- DCHECK(!handle_.is_valid());
- DCHECK_EQ(0u, version_);
- DCHECK(info.is_valid());
+ bool WaitForIncomingResponse() override {
+ ConfigureProxyIfNecessary();
handle_ = info.PassHandle();
version_ = info.version();
@@ -258,6 +253,13 @@ class InterfacePtrState<Interface, true> {
return router_ ? router_->HasAssociatedEndpoints() : false;
}
+ bool WaitForIncomingResponse() {
+ ConfigureProxyIfNecessary();
+
+ DCHECK(router_);
+ return router_->WaitForIncomingMessage(MOJO_DEADLINE_INDEFINITE);
+ }
+
// After this method is called, the object is in an invalid state and
// shouldn't be reused.
InterfacePtrInfo<Interface> PassInterface() {
« no previous file with comments | « ipc/ipc_message_start.h ('k') | mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698