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

Side by Side Diff: mojo/public/cpp/bindings/binding.h

Issue 2750373002: Revert of Mojo: Armed Watchers (Closed)
Patch Set: Created 3 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 | « mojo/public/c/system/watcher.h ('k') | mojo/public/cpp/bindings/connector.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 <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 // Closes the message pipe that was previously bound. Put this object into a 202 // Closes the message pipe that was previously bound. Put this object into a
203 // state where it can be rebound to a new pipe. 203 // state where it can be rebound to a new pipe.
204 void Close() { internal_state_.Close(); } 204 void Close() { internal_state_.Close(); }
205 205
206 // Similar to the method above, but also specifies a disconnect reason. 206 // Similar to the method above, but also specifies a disconnect reason.
207 void CloseWithReason(uint32_t custom_reason, const std::string& description) { 207 void CloseWithReason(uint32_t custom_reason, const std::string& description) {
208 internal_state_.CloseWithReason(custom_reason, description); 208 internal_state_.CloseWithReason(custom_reason, description);
209 } 209 }
210 210
211 void EnableNestedDispatch(bool enabled) {
212 internal_state_.EnableNestedDispatch(enabled);
213 }
214
215 // Unbinds the underlying pipe from this binding and returns it so it can be 211 // Unbinds the underlying pipe from this binding and returns it so it can be
216 // used in another context, such as on another thread or with a different 212 // used in another context, such as on another thread or with a different
217 // implementation. Put this object into a state where it can be rebound to a 213 // implementation. Put this object into a state where it can be rebound to a
218 // new pipe. 214 // new pipe.
219 // 215 //
220 // This method may only be called if the object has been bound to a message 216 // This method may only be called if the object has been bound to a message
221 // pipe and there are no associated interfaces running. 217 // pipe and there are no associated interfaces running.
222 // 218 //
223 // TODO(yzshen): For now, users need to make sure there is no one holding 219 // TODO(yzshen): For now, users need to make sure there is no one holding
224 // on to associated interface endpoint handles at both sides of the 220 // on to associated interface endpoint handles at both sides of the
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 267
272 private: 268 private:
273 internal::BindingState<Interface, ImplRefTraits> internal_state_; 269 internal::BindingState<Interface, ImplRefTraits> internal_state_;
274 270
275 DISALLOW_COPY_AND_ASSIGN(Binding); 271 DISALLOW_COPY_AND_ASSIGN(Binding);
276 }; 272 };
277 273
278 } // namespace mojo 274 } // namespace mojo
279 275
280 #endif // MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_ 276 #endif // MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_
OLDNEW
« no previous file with comments | « mojo/public/c/system/watcher.h ('k') | mojo/public/cpp/bindings/connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698