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