OLD | NEW |
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 THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_ |
6 #define THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_ |
7 | 7 |
8 #include <assert.h> | 8 #include <assert.h> |
9 | 9 |
10 #include "third_party/mojo/src/mojo/public/c/environment/async_waiter.h" | 10 #include "mojo/public/c/environment/async_waiter.h" |
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" | 11 #include "mojo/public/cpp/bindings/binding.h" |
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/callback.h" | 12 #include "mojo/public/cpp/bindings/callback.h" |
13 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h" | 13 #include "mojo/public/cpp/bindings/interface_ptr.h" |
14 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | 14 #include "mojo/public/cpp/bindings/interface_request.h" |
15 #include "third_party/mojo/src/mojo/public/cpp/bindings/lib/filter_chain.h" | 15 #include "mojo/public/cpp/bindings/lib/filter_chain.h" |
16 #include "third_party/mojo/src/mojo/public/cpp/bindings/lib/message_header_valid
ator.h" | 16 #include "mojo/public/cpp/bindings/lib/message_header_validator.h" |
17 #include "third_party/mojo/src/mojo/public/cpp/bindings/lib/router.h" | 17 #include "mojo/public/cpp/bindings/lib/router.h" |
18 #include "third_party/mojo/src/mojo/public/cpp/system/core.h" | 18 #include "mojo/public/cpp/system/core.h" |
19 | 19 |
20 namespace mojo { | 20 namespace mojo { |
21 | 21 |
22 // This connects an interface implementation strongly to a pipe. When a | 22 // This connects an interface implementation strongly to a pipe. When a |
23 // connection error is detected the implementation is deleted. Deleting the | 23 // connection error is detected the implementation is deleted. Deleting the |
24 // connector also closes the pipe. | 24 // connector also closes the pipe. |
25 // | 25 // |
26 // Example of an implementation that is always bound strongly to a pipe | 26 // Example of an implementation that is always bound strongly to a pipe |
27 // | 27 // |
28 // class StronglyBound : public Foo { | 28 // class StronglyBound : public Foo { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 delete binding_.impl(); | 117 delete binding_.impl(); |
118 } | 118 } |
119 | 119 |
120 private: | 120 private: |
121 Closure connection_error_handler_; | 121 Closure connection_error_handler_; |
122 Binding<Interface> binding_; | 122 Binding<Interface> binding_; |
123 }; | 123 }; |
124 | 124 |
125 } // namespace mojo | 125 } // namespace mojo |
126 | 126 |
127 #endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_ | 127 #endif // MOJO_PUBLIC_CPP_BINDINGS_STRONG_BINDING_H_ |
OLD | NEW |