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

Side by Side Diff: mojo/public/cpp/bindings/lib/interface_ptr_state.h

Issue 1720093002: Revert of Mojo C++ bindings: support sync methods - part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/cpp/bindings/lib/connector.cc ('k') | mojo/public/cpp/bindings/lib/router.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_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
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
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_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/connector.cc ('k') | mojo/public/cpp/bindings/lib/router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698