Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Side by Side Diff: content/renderer/plugin_channel_host.cc

Issue 6901146: Switch IPC::ChannelProxy to use MessageLoopProxy instead of MessageLoop. This allows us to remov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/plugin_channel_host.h ('k') | content/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "content/common/plugin_messages.h" 7 #include "content/common/plugin_messages.h"
8 #include "content/plugin/npobject_base.h" 8 #include "content/plugin/npobject_base.h"
9 9
10 #if defined(OS_POSIX) 10 #if defined(OS_POSIX)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bool PluginChannelHost::IsListening() { 61 bool PluginChannelHost::IsListening() {
62 return IsListeningFilter::is_listening_; 62 return IsListeningFilter::is_listening_;
63 } 63 }
64 64
65 // static 65 // static
66 void PluginChannelHost::SetListening(bool flag) { 66 void PluginChannelHost::SetListening(bool flag) {
67 IsListeningFilter::is_listening_ = flag; 67 IsListeningFilter::is_listening_ = flag;
68 } 68 }
69 69
70 PluginChannelHost* PluginChannelHost::GetPluginChannelHost( 70 PluginChannelHost* PluginChannelHost::GetPluginChannelHost(
71 const IPC::ChannelHandle& channel_handle, MessageLoop* ipc_message_loop) { 71 const IPC::ChannelHandle& channel_handle,
72 base::MessageLoopProxy* ipc_message_loop) {
72 PluginChannelHost* result = 73 PluginChannelHost* result =
73 static_cast<PluginChannelHost*>(PluginChannelBase::GetChannel( 74 static_cast<PluginChannelHost*>(PluginChannelBase::GetChannel(
74 channel_handle, 75 channel_handle,
75 IPC::Channel::MODE_CLIENT, 76 IPC::Channel::MODE_CLIENT,
76 ClassFactory, 77 ClassFactory,
77 ipc_message_loop, 78 ipc_message_loop,
78 true)); 79 true));
79 return result; 80 return result;
80 } 81 }
81 82
82 PluginChannelHost::PluginChannelHost() : expecting_shutdown_(false) { 83 PluginChannelHost::PluginChannelHost() : expecting_shutdown_(false) {
83 } 84 }
84 85
85 PluginChannelHost::~PluginChannelHost() { 86 PluginChannelHost::~PluginChannelHost() {
86 } 87 }
87 88
88 bool PluginChannelHost::Init(MessageLoop* ipc_message_loop, 89 bool PluginChannelHost::Init(base::MessageLoopProxy* ipc_message_loop,
89 bool create_pipe_now) { 90 bool create_pipe_now) {
90 bool ret = PluginChannelBase::Init(ipc_message_loop, create_pipe_now); 91 bool ret = PluginChannelBase::Init(ipc_message_loop, create_pipe_now);
91 is_listening_filter_ = new IsListeningFilter; 92 is_listening_filter_ = new IsListeningFilter;
92 channel_->AddFilter(is_listening_filter_); 93 channel_->AddFilter(is_listening_filter_);
93 return ret; 94 return ret;
94 } 95 }
95 96
96 int PluginChannelHost::GenerateRouteID() { 97 int PluginChannelHost::GenerateRouteID() {
97 int route_id = MSG_ROUTING_NONE; 98 int route_id = MSG_ROUTING_NONE;
98 Send(new PluginMsg_GenerateRouteID(&route_id)); 99 Send(new PluginMsg_GenerateRouteID(&route_id));
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 void PluginChannelHost::OnChannelError() { 137 void PluginChannelHost::OnChannelError() {
137 PluginChannelBase::OnChannelError(); 138 PluginChannelBase::OnChannelError();
138 139
139 for (ProxyMap::iterator iter = proxies_.begin(); 140 for (ProxyMap::iterator iter = proxies_.begin();
140 iter != proxies_.end(); iter++) { 141 iter != proxies_.end(); iter++) {
141 iter->second->OnChannelError(); 142 iter->second->OnChannelError();
142 } 143 }
143 144
144 proxies_.clear(); 145 proxies_.clear();
145 } 146 }
OLDNEW
« no previous file with comments | « content/renderer/plugin_channel_host.h ('k') | content/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698