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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // See crbug.com/97285 for details. | 134 // See crbug.com/97285 for details. |
135 if (mode_ == IPC::Channel::MODE_SERVER) | 135 if (mode_ == IPC::Channel::MODE_SERVER) |
136 CHECK_NE(-1, channel_->GetClientFileDescriptor()); | 136 CHECK_NE(-1, channel_->GetClientFileDescriptor()); |
137 #endif | 137 #endif |
138 | 138 |
139 channel_valid_ = true; | 139 channel_valid_ = true; |
140 return true; | 140 return true; |
141 } | 141 } |
142 | 142 |
143 bool NPChannelBase::Send(IPC::Message* message) { | 143 bool NPChannelBase::Send(IPC::Message* message) { |
144 if (!channel_.get()) { | 144 if (!channel_) { |
145 VLOG(1) << "Channel is NULL; dropping message"; | 145 VLOG(1) << "Channel is NULL; dropping message"; |
146 delete message; | 146 delete message; |
147 return false; | 147 return false; |
148 } | 148 } |
149 | 149 |
150 if (send_unblocking_only_during_unblock_dispatch_ && | 150 if (send_unblocking_only_during_unblock_dispatch_ && |
151 in_unblock_dispatch_ == 0 && | 151 in_unblock_dispatch_ == 0 && |
152 message->is_sync()) { | 152 message->is_sync()) { |
153 message->set_unblock(false); | 153 message->set_unblock(false); |
154 } | 154 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 NPObject* object) { | 296 NPObject* object) { |
297 DCHECK(object != NULL); | 297 DCHECK(object != NULL); |
298 stub_map_.erase(object); | 298 stub_map_.erase(object); |
299 } | 299 } |
300 | 300 |
301 void NPChannelBase::RemoveMappingForNPObjectProxy(int route_id) { | 301 void NPChannelBase::RemoveMappingForNPObjectProxy(int route_id) { |
302 proxy_map_.erase(route_id); | 302 proxy_map_.erase(route_id); |
303 } | 303 } |
304 | 304 |
305 } // namespace content | 305 } // namespace content |
OLD | NEW |