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

Side by Side Diff: mojo/public/cpp/bindings/lib/binding_state.cc

Issue 2283543002: Add support for dispatch contexts on BindingSet (Closed)
Patch Set: . Created 4 years, 3 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/binding_state.h ('k') | mojo/public/cpp/bindings/tests/BUILD.gn » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "mojo/public/cpp/bindings/lib/binding_state.h" 5 #include "mojo/public/cpp/bindings/lib/binding_state.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 namespace internal { 8 namespace internal {
9 9
10 SimpleBindingState::SimpleBindingState() = default; 10 SimpleBindingState::SimpleBindingState() = default;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 if (!connection_error_handler_.is_null()) 72 if (!connection_error_handler_.is_null())
73 connection_error_handler_.Run(); 73 connection_error_handler_.Run();
74 } 74 }
75 75
76 // ----------------------------------------------------------------------------- 76 // -----------------------------------------------------------------------------
77 77
78 MultiplexedBindingState::MultiplexedBindingState() = default; 78 MultiplexedBindingState::MultiplexedBindingState() = default;
79 79
80 MultiplexedBindingState::~MultiplexedBindingState() = default; 80 MultiplexedBindingState::~MultiplexedBindingState() = default;
81 81
82 void MultiplexedBindingState::AddFilter(
83 std::unique_ptr<MessageReceiver> filter) {
84 DCHECK(endpoint_client_);
85 endpoint_client_->AddFilter(std::move(filter));
86 }
87
82 bool MultiplexedBindingState::HasAssociatedInterfaces() const { 88 bool MultiplexedBindingState::HasAssociatedInterfaces() const {
83 return router_ ? router_->HasAssociatedEndpoints() : false; 89 return router_ ? router_->HasAssociatedEndpoints() : false;
84 } 90 }
85 91
86 void MultiplexedBindingState::PauseIncomingMethodCallProcessing() { 92 void MultiplexedBindingState::PauseIncomingMethodCallProcessing() {
87 DCHECK(router_); 93 DCHECK(router_);
88 router_->PauseIncomingMethodCallProcessing(); 94 router_->PauseIncomingMethodCallProcessing();
89 } 95 }
90 void MultiplexedBindingState::ResumeIncomingMethodCallProcessing() { 96 void MultiplexedBindingState::ResumeIncomingMethodCallProcessing() {
91 DCHECK(router_); 97 DCHECK(router_);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 base::Unretained(this))); 139 base::Unretained(this)));
134 } 140 }
135 141
136 void MultiplexedBindingState::RunConnectionErrorHandler() { 142 void MultiplexedBindingState::RunConnectionErrorHandler() {
137 if (!connection_error_handler_.is_null()) 143 if (!connection_error_handler_.is_null())
138 connection_error_handler_.Run(); 144 connection_error_handler_.Run();
139 } 145 }
140 146
141 } // namesapce internal 147 } // namesapce internal
142 } // namespace mojo 148 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/binding_state.h ('k') | mojo/public/cpp/bindings/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698