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

Unified Diff: mojo/public/cpp/bindings/strong_binding.h

Issue 739493002: Introduce command buffer control thread (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Route echo better Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/binding.h ('k') | mojo/services/gles2/command_buffer_driver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/strong_binding.h
diff --git a/mojo/public/cpp/bindings/strong_binding.h b/mojo/public/cpp/bindings/strong_binding.h
index 986c072219f1ec6425cb050a8a58b49f418605b4..73b43b3983d3127f24fbff7c74413be445c56445 100644
--- a/mojo/public/cpp/bindings/strong_binding.h
+++ b/mojo/public/cpp/bindings/strong_binding.h
@@ -5,6 +5,8 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_
#define MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_
+#include <assert.h>
+
#include "mojo/public/c/environment/async_waiter.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/error_handler.h"
@@ -67,6 +69,27 @@ class StrongBinding : public ErrorHandler {
~StrongBinding() override {}
+ void Bind(
+ ScopedMessagePipeHandle handle,
+ const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
+ assert(!binding_.is_bound());
+ binding_.Bind(handle.Pass(), waiter);
+ }
+
+ void Bind(
+ InterfacePtr<Interface>* ptr,
+ const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
+ assert(!binding_.is_bound());
+ binding_.Bind(ptr, waiter);
+ }
+
+ void Bind(
+ InterfaceRequest<Interface> request,
+ const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
+ assert(!binding_.is_bound());
+ binding_.Bind(request.Pass(), waiter);
+ }
+
bool WaitForIncomingMethodCall() {
return binding_.WaitForIncomingMethodCall();
}
« no previous file with comments | « mojo/public/cpp/bindings/binding.h ('k') | mojo/services/gles2/command_buffer_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698