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

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

Issue 1811433002: [mojo-edk] Expose notification source to MojoWatch callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/interface_ptr.h
diff --git a/mojo/public/cpp/bindings/interface_ptr.h b/mojo/public/cpp/bindings/interface_ptr.h
index 9b005eee815eeec57aea39b5563baf3d87bd705c..f0532d7c09a012f4af1e5b681b5d3c4cd65f1ab2 100644
--- a/mojo/public/cpp/bindings/interface_ptr.h
+++ b/mojo/public/cpp/bindings/interface_ptr.h
@@ -173,6 +173,16 @@ class InterfacePtr {
return internal_state_.associated_group();
}
+ // Allows synchronous dispatch for this endpoint. When sync dispatch is
+ // allowed, a response originating from a binding on the same thread may
+ // synchronously invoke the response callback.
+ //
+ // Note that this also allows synchronous dispatch for any endpoints
+ // which are associated with this one and which live on the same thread.
+ void SetAllowSyncDispatch(bool allowed) {
+ internal_state_.SetAllowSyncDispatch(allowed);
+ }
+
// DO NOT USE. Exposed only for internal use and for testing.
internal::InterfacePtrState<Interface, Interface::PassesAssociatedKinds_>*
internal_state() {

Powered by Google App Engine
This is Rietveld 408576698