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::RegisterBrokerCommunicationChannel(Endpoint* endpoint) { | |
86 NOTREACHED(); | |
87 } | |
88 | |
89 void AttachmentBroker::DeregisterBrokerCommunicationChannel( | |
90 Endpoint* endpoint) { | |
91 NOTREACHED(); | |
92 } | |
93 | |
94 bool AttachmentBroker::IsPrivilegedBroker() { | |
95 NOTREACHED(); | |
96 return false; | |
97 } | |
98 | |
99 void AttachmentBroker::HandleReceivedAttachment( | 85 void AttachmentBroker::HandleReceivedAttachment( |
100 const scoped_refptr<BrokerableAttachment>& attachment) { | 86 const scoped_refptr<BrokerableAttachment>& attachment) { |
101 { | 87 { |
102 base::AutoLock auto_lock(*get_lock()); | 88 base::AutoLock auto_lock(*get_lock()); |
103 attachments_.push_back(attachment); | 89 attachments_.push_back(attachment); |
104 } | 90 } |
105 NotifyObservers(attachment->GetIdentifier()); | 91 NotifyObservers(attachment->GetIdentifier()); |
106 } | 92 } |
107 | 93 |
108 void AttachmentBroker::NotifyObservers( | 94 void AttachmentBroker::NotifyObservers( |
(...skipping 28 matching lines...) Expand all Loading... |
137 observer = it->observer; | 123 observer = it->observer; |
138 } | 124 } |
139 | 125 |
140 observer->ReceivedBrokerableAttachmentWithId(id); | 126 observer->ReceivedBrokerableAttachmentWithId(id); |
141 } | 127 } |
142 | 128 |
143 AttachmentBroker::ObserverInfo::ObserverInfo() {} | 129 AttachmentBroker::ObserverInfo::ObserverInfo() {} |
144 AttachmentBroker::ObserverInfo::~ObserverInfo() {} | 130 AttachmentBroker::ObserverInfo::~ObserverInfo() {} |
145 | 131 |
146 } // namespace IPC | 132 } // namespace IPC |
OLD | NEW |