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

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

Issue 1713203002: 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_ = new Router(std::move(handle_), std::move(filters), waiter_); 175 router_ =
176 new Router(std::move(handle_), std::move(filters), false, waiter_);
176 waiter_ = nullptr; 177 waiter_ = nullptr;
177 178
178 proxy_ = new Proxy(router_); 179 proxy_ = new Proxy(router_);
179 } 180 }
180 181
181 Proxy* proxy_; 182 Proxy* proxy_;
182 Router* router_; 183 Router* router_;
183 184
184 // |proxy_| and |router_| are not initialized until read/write with the 185 // |proxy_| and |router_| are not initialized until read/write with the
185 // message pipe handle is needed. |handle_| and |waiter_| are valid between 186 // message pipe handle is needed. |handle_| and |waiter_| are valid between
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 358
358 uint32_t version_; 359 uint32_t version_;
359 360
360 DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); 361 DISALLOW_COPY_AND_ASSIGN(InterfacePtrState);
361 }; 362 };
362 363
363 } // namespace internal 364 } // namespace internal
364 } // namespace mojo 365 } // namespace mojo
365 366
366 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ 367 #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