| 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 | |
| 94 void AttachmentBroker::HandleReceivedAttachment( | 85 void AttachmentBroker::HandleReceivedAttachment( |
| 95 const scoped_refptr<BrokerableAttachment>& attachment) { | 86 const scoped_refptr<BrokerableAttachment>& attachment) { |
| 96 { | 87 { |
| 97 base::AutoLock auto_lock(*get_lock()); | 88 base::AutoLock auto_lock(*get_lock()); |
| 98 attachments_.push_back(attachment); | 89 attachments_.push_back(attachment); |
| 99 } | 90 } |
| 100 NotifyObservers(attachment->GetIdentifier()); | 91 NotifyObservers(attachment->GetIdentifier()); |
| 101 } | 92 } |
| 102 | 93 |
| 103 void AttachmentBroker::NotifyObservers( | 94 void AttachmentBroker::NotifyObservers( |
| (...skipping 28 matching lines...) Expand all Loading... |
| 132 observer = it->observer; | 123 observer = it->observer; |
| 133 } | 124 } |
| 134 | 125 |
| 135 observer->ReceivedBrokerableAttachmentWithId(id); | 126 observer->ReceivedBrokerableAttachmentWithId(id); |
| 136 } | 127 } |
| 137 | 128 |
| 138 AttachmentBroker::ObserverInfo::ObserverInfo() {} | 129 AttachmentBroker::ObserverInfo::ObserverInfo() {} |
| 139 AttachmentBroker::ObserverInfo::~ObserverInfo() {} | 130 AttachmentBroker::ObserverInfo::~ObserverInfo() {} |
| 140 | 131 |
| 141 } // namespace IPC | 132 } // namespace IPC |
| OLD | NEW |