OLD | NEW |
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 #include "ipc/attachment_broker.h" | 5 #include "ipc/attachment_broker.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 void AttachmentBroker::RemoveObserver(AttachmentBroker::Observer* observer) { | 74 void AttachmentBroker::RemoveObserver(AttachmentBroker::Observer* observer) { |
75 base::AutoLock auto_lock(*get_lock()); | 75 base::AutoLock auto_lock(*get_lock()); |
76 auto it = std::find_if(observers_.begin(), observers_.end(), | 76 auto it = std::find_if(observers_.begin(), observers_.end(), |
77 [observer](const ObserverInfo& info) { | 77 [observer](const ObserverInfo& info) { |
78 return info.observer == observer; | 78 return info.observer == observer; |
79 }); | 79 }); |
80 if (it != observers_.end()) | 80 if (it != observers_.end()) |
81 observers_.erase(it); | 81 observers_.erase(it); |
82 } | 82 } |
83 | 83 |
84 void AttachmentBroker::RegisterCommunicationChannel(Endpoint* endpoint) { | 84 void AttachmentBroker::RegisterCommunicationChannel( |
| 85 Endpoint* endpoint, |
| 86 scoped_refptr<base::SingleThreadTaskRunner> runner) { |
85 NOTREACHED(); | 87 NOTREACHED(); |
86 } | 88 } |
87 | 89 |
88 void AttachmentBroker::DeregisterCommunicationChannel(Endpoint* endpoint) { | 90 void AttachmentBroker::DeregisterCommunicationChannel(Endpoint* endpoint) { |
89 NOTREACHED(); | 91 NOTREACHED(); |
90 } | 92 } |
91 | 93 |
92 void AttachmentBroker::RegisterBrokerCommunicationChannel(Endpoint* endpoint) { | 94 void AttachmentBroker::RegisterBrokerCommunicationChannel(Endpoint* endpoint) { |
93 NOTREACHED(); | 95 NOTREACHED(); |
94 } | 96 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 148 |
147 observer->ReceivedBrokerableAttachmentWithId(id); | 149 observer->ReceivedBrokerableAttachmentWithId(id); |
148 } | 150 } |
149 | 151 |
150 AttachmentBroker::ObserverInfo::ObserverInfo() {} | 152 AttachmentBroker::ObserverInfo::ObserverInfo() {} |
151 AttachmentBroker::ObserverInfo::ObserverInfo(const ObserverInfo& other) = | 153 AttachmentBroker::ObserverInfo::ObserverInfo(const ObserverInfo& other) = |
152 default; | 154 default; |
153 AttachmentBroker::ObserverInfo::~ObserverInfo() {} | 155 AttachmentBroker::ObserverInfo::~ObserverInfo() {} |
154 | 156 |
155 } // namespace IPC | 157 } // namespace IPC |
OLD | NEW |