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 MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <algorithm> // For |std::swap()|. | 9 #include <algorithm> // For |std::swap()|. |
10 #include <utility> | 10 #include <utility> |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // The object hasn't been bound. | 165 // The object hasn't been bound. |
166 if (!waiter_) { | 166 if (!waiter_) { |
167 DCHECK(!handle_.is_valid()); | 167 DCHECK(!handle_.is_valid()); |
168 return; | 168 return; |
169 } | 169 } |
170 | 170 |
171 FilterChain filters; | 171 FilterChain filters; |
172 filters.Append<MessageHeaderValidator>(); | 172 filters.Append<MessageHeaderValidator>(); |
173 filters.Append<typename Interface::ResponseValidator_>(); | 173 filters.Append<typename Interface::ResponseValidator_>(); |
174 | 174 |
175 router_ = | 175 router_ = new Router(std::move(handle_), std::move(filters), waiter_); |
176 new Router(std::move(handle_), std::move(filters), false, waiter_); | |
177 waiter_ = nullptr; | 176 waiter_ = nullptr; |
178 | 177 |
179 proxy_ = new Proxy(router_); | 178 proxy_ = new Proxy(router_); |
180 } | 179 } |
181 | 180 |
182 Proxy* proxy_; | 181 Proxy* proxy_; |
183 Router* router_; | 182 Router* router_; |
184 | 183 |
185 // |proxy_| and |router_| are not initialized until read/write with the | 184 // |proxy_| and |router_| are not initialized until read/write with the |
186 // message pipe handle is needed. |handle_| and |waiter_| are valid between | 185 // message pipe handle is needed. |handle_| and |waiter_| are valid between |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 357 |
359 uint32_t version_; | 358 uint32_t version_; |
360 | 359 |
361 DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); | 360 DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); |
362 }; | 361 }; |
363 | 362 |
364 } // namespace internal | 363 } // namespace internal |
365 } // namespace mojo | 364 } // namespace mojo |
366 | 365 |
367 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ | 366 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ |
OLD | NEW |