OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/common/np_channel_base.h" | 5 #include "content/common/np_channel_base.h" |
6 | 6 |
7 #include <stack> | 7 #include <stack> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 g_lazy_channel_stack.Pointer()->pop(); | 185 g_lazy_channel_stack.Pointer()->pop(); |
186 return handled; | 186 return handled; |
187 } | 187 } |
188 | 188 |
189 void NPChannelBase::OnChannelConnected(int32 peer_pid) { | 189 void NPChannelBase::OnChannelConnected(int32 peer_pid) { |
190 peer_pid_ = peer_pid; | 190 peer_pid_ = peer_pid; |
191 } | 191 } |
192 | 192 |
193 void NPChannelBase::AddRoute(int route_id, | 193 void NPChannelBase::AddRoute(int route_id, |
194 IPC::Channel::Listener* listener, | 194 IPC::Listener* listener, |
195 NPObjectBase* npobject) { | 195 NPObjectBase* npobject) { |
196 if (npobject) { | 196 if (npobject) { |
197 npobject_listeners_[route_id] = npobject; | 197 npobject_listeners_[route_id] = npobject; |
198 } else { | 198 } else { |
199 non_npobject_count_++; | 199 non_npobject_count_++; |
200 } | 200 } |
201 | 201 |
202 router_.AddRoute(route_id, listener); | 202 router_.AddRoute(route_id, listener); |
203 } | 203 } |
204 | 204 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 292 |
293 void NPChannelBase::RemoveMappingForNPObjectStub(int route_id, | 293 void NPChannelBase::RemoveMappingForNPObjectStub(int route_id, |
294 NPObject* object) { | 294 NPObject* object) { |
295 DCHECK(object != NULL); | 295 DCHECK(object != NULL); |
296 stub_map_.erase(object); | 296 stub_map_.erase(object); |
297 } | 297 } |
298 | 298 |
299 void NPChannelBase::RemoveMappingForNPObjectProxy(int route_id) { | 299 void NPChannelBase::RemoveMappingForNPObjectProxy(int route_id) { |
300 proxy_map_.erase(route_id); | 300 proxy_map_.erase(route_id); |
301 } | 301 } |
OLD | NEW |