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

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

Issue 2492463005: Mojo C++ bindings: reduce references to AssociatedGroupController. (Closed)
Patch Set: . Created 4 years, 1 month 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 | « no previous file | mojo/public/cpp/bindings/lib/associated_interface_ptr_state.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_ASSOCIATED_BINDING_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (!handle.is_valid() || !handle.is_local()) { 103 if (!handle.is_valid() || !handle.is_local()) {
104 endpoint_client_.reset(); 104 endpoint_client_.reset();
105 return; 105 return;
106 } 106 }
107 107
108 endpoint_client_.reset(new InterfaceEndpointClient( 108 endpoint_client_.reset(new InterfaceEndpointClient(
109 std::move(handle), &stub_, 109 std::move(handle), &stub_,
110 base::WrapUnique(new typename Interface::RequestValidator_()), 110 base::WrapUnique(new typename Interface::RequestValidator_()),
111 Interface::HasSyncMethods_, std::move(runner), Interface::Version_)); 111 Interface::HasSyncMethods_, std::move(runner), Interface::Version_));
112 112
113 stub_.serialization_context()->group_controller = 113 if (Interface::PassesAssociatedKinds_) {
114 endpoint_client_->group_controller(); 114 stub_.serialization_context()->group_controller =
115 endpoint_client_->group_controller();
116 }
115 } 117 }
116 118
117 // Adds a message filter to be notified of each incoming message before 119 // Adds a message filter to be notified of each incoming message before
118 // dispatch. If a filter returns |false| from Accept(), the message is not 120 // dispatch. If a filter returns |false| from Accept(), the message is not
119 // dispatched and the pipe is closed. Filters cannot be removed. 121 // dispatched and the pipe is closed. Filters cannot be removed.
120 void AddFilter(std::unique_ptr<MessageReceiver> filter) { 122 void AddFilter(std::unique_ptr<MessageReceiver> filter) {
121 DCHECK(endpoint_client_); 123 DCHECK(endpoint_client_);
122 endpoint_client_->AddFilter(std::move(filter)); 124 endpoint_client_->AddFilter(std::move(filter));
123 } 125 }
124 126
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 private: 192 private:
191 std::unique_ptr<InterfaceEndpointClient> endpoint_client_; 193 std::unique_ptr<InterfaceEndpointClient> endpoint_client_;
192 typename Interface::template Stub_<ImplRefTraits> stub_; 194 typename Interface::template Stub_<ImplRefTraits> stub_;
193 195
194 DISALLOW_COPY_AND_ASSIGN(AssociatedBinding); 196 DISALLOW_COPY_AND_ASSIGN(AssociatedBinding);
195 }; 197 };
196 198
197 } // namespace mojo 199 } // namespace mojo
198 200
199 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_H_ 201 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_BINDING_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698