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/renderer/plugin_channel_host.h" | 5 #include "content/renderer/plugin_channel_host.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "content/common/child_process.h" | 9 #include "content/common/child_process.h" |
10 #include "content/common_child/npobject_base.h" | 10 #include "content/common_child/npobject_base.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 PluginChannelHost::~PluginChannelHost() { | 137 PluginChannelHost::~PluginChannelHost() { |
138 } | 138 } |
139 | 139 |
140 bool PluginChannelHost::Init(base::MessageLoopProxy* ipc_message_loop, | 140 bool PluginChannelHost::Init(base::MessageLoopProxy* ipc_message_loop, |
141 bool create_pipe_now, | 141 bool create_pipe_now, |
142 base::WaitableEvent* shutdown_event) { | 142 base::WaitableEvent* shutdown_event) { |
143 bool ret = | 143 bool ret = |
144 NPChannelBase::Init(ipc_message_loop, create_pipe_now, shutdown_event); | 144 NPChannelBase::Init(ipc_message_loop, create_pipe_now, shutdown_event); |
145 if (ret) { | 145 if (ret) { |
146 is_listening_filter_ = new IsListeningFilter; | 146 is_listening_filter_ = new IsListeningFilter; |
147 channel_->AddFilter(is_listening_filter_); | 147 channel_->AddFilter(is_listening_filter_.get()); |
148 } | 148 } |
149 return ret; | 149 return ret; |
150 } | 150 } |
151 | 151 |
152 int PluginChannelHost::GenerateRouteID() { | 152 int PluginChannelHost::GenerateRouteID() { |
153 int route_id = MSG_ROUTING_NONE; | 153 int route_id = MSG_ROUTING_NONE; |
154 Send(new PluginMsg_GenerateRouteID(&route_id)); | 154 Send(new PluginMsg_GenerateRouteID(&route_id)); |
155 | 155 |
156 return route_id; | 156 return route_id; |
157 } | 157 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 for (ProxyMap::iterator iter = proxies_.begin(); | 226 for (ProxyMap::iterator iter = proxies_.begin(); |
227 iter != proxies_.end(); iter++) { | 227 iter != proxies_.end(); iter++) { |
228 iter->second->OnChannelError(); | 228 iter->second->OnChannelError(); |
229 } | 229 } |
230 | 230 |
231 proxies_.clear(); | 231 proxies_.clear(); |
232 } | 232 } |
233 | 233 |
234 } // namespace content | 234 } // namespace content |
OLD | NEW |