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

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

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: . Created 3 years, 9 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
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 BindingStateBase::BindingStateBase() = default; 10 BindingStateBase::BindingStateBase() = default;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 void BindingStateBase::CloseWithReason(uint32_t custom_reason, 46 void BindingStateBase::CloseWithReason(uint32_t custom_reason,
47 const std::string& description) { 47 const std::string& description) {
48 if (endpoint_client_) 48 if (endpoint_client_)
49 endpoint_client_->CloseWithReason(custom_reason, description); 49 endpoint_client_->CloseWithReason(custom_reason, description);
50 50
51 Close(); 51 Close();
52 } 52 }
53 53
54 void BindingStateBase::EnableNestedDispatch(bool enabled) {
55 router_->EnableNestedDispatch(enabled);
56 }
57
54 void BindingStateBase::FlushForTesting() { 58 void BindingStateBase::FlushForTesting() {
55 endpoint_client_->FlushForTesting(); 59 endpoint_client_->FlushForTesting();
56 } 60 }
57 61
58 void BindingStateBase::EnableTestingMode() { 62 void BindingStateBase::EnableTestingMode() {
59 DCHECK(is_bound()); 63 DCHECK(is_bound());
60 router_->EnableTestingMode(); 64 router_->EnableTestingMode();
61 } 65 }
62 66
63 void BindingStateBase::BindInternal( 67 void BindingStateBase::BindInternal(
(...skipping 17 matching lines...) Expand all
81 router_->SetMasterInterfaceName(interface_name); 85 router_->SetMasterInterfaceName(interface_name);
82 86
83 endpoint_client_.reset(new InterfaceEndpointClient( 87 endpoint_client_.reset(new InterfaceEndpointClient(
84 router_->CreateLocalEndpointHandle(kMasterInterfaceId), stub, 88 router_->CreateLocalEndpointHandle(kMasterInterfaceId), stub,
85 std::move(request_validator), has_sync_methods, std::move(runner), 89 std::move(request_validator), has_sync_methods, std::move(runner),
86 interface_version)); 90 interface_version));
87 } 91 }
88 92
89 } // namesapce internal 93 } // namesapce internal
90 } // namespace mojo 94 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698