| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 | 76 |
| 77 void AttachmentBroker::RegisterCommunicationChannel(Endpoint* endpoint) { | 77 void AttachmentBroker::RegisterCommunicationChannel(Endpoint* endpoint) { |
| 78 NOTREACHED(); | 78 NOTREACHED(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void AttachmentBroker::DeregisterCommunicationChannel(Endpoint* endpoint) { | 81 void AttachmentBroker::DeregisterCommunicationChannel(Endpoint* endpoint) { |
| 82 NOTREACHED(); | 82 NOTREACHED(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void AttachmentBroker::DesignateBrokerCommunicationChannel(Endpoint* endpoint) { |
| 86 NOTREACHED(); |
| 87 } |
| 88 |
| 89 bool AttachmentBroker::IsPrivilegedBroker() { |
| 90 NOTREACHED(); |
| 91 return false; |
| 92 } |
| 93 |
| 85 void AttachmentBroker::HandleReceivedAttachment( | 94 void AttachmentBroker::HandleReceivedAttachment( |
| 86 const scoped_refptr<BrokerableAttachment>& attachment) { | 95 const scoped_refptr<BrokerableAttachment>& attachment) { |
| 87 { | 96 { |
| 88 base::AutoLock auto_lock(*get_lock()); | 97 base::AutoLock auto_lock(*get_lock()); |
| 89 attachments_.push_back(attachment); | 98 attachments_.push_back(attachment); |
| 90 } | 99 } |
| 91 NotifyObservers(attachment->GetIdentifier()); | 100 NotifyObservers(attachment->GetIdentifier()); |
| 92 } | 101 } |
| 93 | 102 |
| 94 void AttachmentBroker::NotifyObservers( | 103 void AttachmentBroker::NotifyObservers( |
| (...skipping 28 matching lines...) Expand all Loading... |
| 123 observer = it->observer; | 132 observer = it->observer; |
| 124 } | 133 } |
| 125 | 134 |
| 126 observer->ReceivedBrokerableAttachmentWithId(id); | 135 observer->ReceivedBrokerableAttachmentWithId(id); |
| 127 } | 136 } |
| 128 | 137 |
| 129 AttachmentBroker::ObserverInfo::ObserverInfo() {} | 138 AttachmentBroker::ObserverInfo::ObserverInfo() {} |
| 130 AttachmentBroker::ObserverInfo::~ObserverInfo() {} | 139 AttachmentBroker::ObserverInfo::~ObserverInfo() {} |
| 131 | 140 |
| 132 } // namespace IPC | 141 } // namespace IPC |
| OLD | NEW |