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

Side by Side Diff: mojo/public/cpp/bindings/binding.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 unified diff | Download patch
« no previous file with comments | « ipc/mojo/ipc_mojo_bootstrap.cc ('k') | mojo/public/cpp/bindings/interface_ptr.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 MessagePipeHandle handle() const { return internal_state_.handle(); } 201 MessagePipeHandle handle() const { return internal_state_.handle(); }
202 202
203 // Returns the associated group that this object belongs to. Returns null if: 203 // Returns the associated group that this object belongs to. Returns null if:
204 // - this object is not bound; or 204 // - this object is not bound; or
205 // - the interface doesn't have methods to pass associated interface 205 // - the interface doesn't have methods to pass associated interface
206 // pointers or requests. 206 // pointers or requests.
207 AssociatedGroup* associated_group() { 207 AssociatedGroup* associated_group() {
208 return internal_state_.associated_group(); 208 return internal_state_.associated_group();
209 } 209 }
210 210
211 // Allows synchronous dispatch for this Binding. When sync dispatch is
yzshen1 2016/03/16 15:38:18 This comment also needs to mention bindings living
212 // allowed, a client on the same thread as this Binding will synchronously
213 // enter the bound implementation when writing messages to its pipe.
214 //
215 // Note that this also allows synchronous dispatch for any endpoints
216 // which are associated with this one and which live on the same thread.
217 void SetAllowSyncDispatch(bool allowed) {
218 internal_state_.SetAllowSyncDispatch(allowed);
219 }
220
211 // Exposed for testing, should not generally be used. 221 // Exposed for testing, should not generally be used.
212 void EnableTestingMode() { internal_state_.EnableTestingMode(); } 222 void EnableTestingMode() { internal_state_.EnableTestingMode(); }
213 223
214 private: 224 private:
215 internal::BindingState<Interface, Interface::PassesAssociatedKinds_> 225 internal::BindingState<Interface, Interface::PassesAssociatedKinds_>
216 internal_state_; 226 internal_state_;
217 227
218 DISALLOW_COPY_AND_ASSIGN(Binding); 228 DISALLOW_COPY_AND_ASSIGN(Binding);
219 }; 229 };
220 230
221 } // namespace mojo 231 } // namespace mojo
222 232
223 #endif // MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_ 233 #endif // MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_
OLDNEW
« no previous file with comments | « ipc/mojo/ipc_mojo_bootstrap.cc ('k') | mojo/public/cpp/bindings/interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698