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

Side by Side Diff: chrome/renderer/webplugin_delegate_proxy.cc

Issue 155944: Switch the first thread in a child process to be the main thread... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 11 years, 5 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/renderer/webplugin_delegate_proxy.h" 5 #include "chrome/renderer/webplugin_delegate_proxy.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // case, don't try to connect to it, the empty name represents the host 230 // case, don't try to connect to it, the empty name represents the host
231 // channel, and connecting to it again does bad things. 231 // channel, and connecting to it again does bad things.
232 return false; 232 return false;
233 } 233 }
234 234
235 // If we received a ChannelHandle, register it now. 235 // If we received a ChannelHandle, register it now.
236 if (channel_handle.socket.fd >= 0) 236 if (channel_handle.socket.fd >= 0)
237 IPC::AddChannelSocket(channel_handle.name, channel_handle.socket.fd); 237 IPC::AddChannelSocket(channel_handle.name, channel_handle.socket.fd);
238 #endif 238 #endif
239 239
240 MessageLoop* ipc_message_loop = RenderThread::current()->owner_loop();
241 scoped_refptr<PluginChannelHost> channel_host = 240 scoped_refptr<PluginChannelHost> channel_host =
242 PluginChannelHost::GetPluginChannelHost(channel_handle.name, 241 PluginChannelHost::GetPluginChannelHost(
243 ipc_message_loop); 242 channel_handle.name, ChildProcess::current()->io_message_loop());
244 if (!channel_host.get()) 243 if (!channel_host.get())
245 return false; 244 return false;
246 245
247 int instance_id; 246 int instance_id;
248 bool result = channel_host->Send(new PluginMsg_CreateInstance( 247 bool result = channel_host->Send(new PluginMsg_CreateInstance(
249 mime_type_, &instance_id)); 248 mime_type_, &instance_id));
250 if (!result) 249 if (!result)
251 return false; 250 return false;
252 251
253 plugin_path_ = plugin_path; 252 plugin_path_ = plugin_path;
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 plugin_->CancelDocumentLoad(); 1037 plugin_->CancelDocumentLoad();
1039 } 1038 }
1040 1039
1041 void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest( 1040 void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest(
1042 const std::string& url, const std::string& range_info, 1041 const std::string& url, const std::string& range_info,
1043 intptr_t existing_stream, bool notify_needed, intptr_t notify_data) { 1042 intptr_t existing_stream, bool notify_needed, intptr_t notify_data) {
1044 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(), 1043 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(),
1045 existing_stream, notify_needed, 1044 existing_stream, notify_needed,
1046 notify_data); 1045 notify_data);
1047 } 1046 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698