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

Side by Side Diff: content/plugin/plugin_thread.cc

Issue 7870008: Wait properly for renderer crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win? Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/plugin/plugin_thread.h" 5 #include "content/plugin/plugin_thread.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(TOOLKIT_USES_GTK) 9 #if defined(TOOLKIT_USES_GTK)
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 void PluginThread::OnCreateChannel(int renderer_id, 151 void PluginThread::OnCreateChannel(int renderer_id,
152 bool incognito) { 152 bool incognito) {
153 scoped_refptr<PluginChannel> channel(PluginChannel::GetPluginChannel( 153 scoped_refptr<PluginChannel> channel(PluginChannel::GetPluginChannel(
154 renderer_id, ChildProcess::current()->io_message_loop_proxy())); 154 renderer_id, ChildProcess::current()->io_message_loop_proxy()));
155 IPC::ChannelHandle channel_handle; 155 IPC::ChannelHandle channel_handle;
156 if (channel.get()) { 156 if (channel.get()) {
157 channel_handle.name = channel->channel_handle().name; 157 channel_handle.name = channel->channel_handle().name;
158 #if defined(OS_POSIX) 158 #if defined(OS_POSIX)
159 // On POSIX, pass the renderer-side FD. 159 // On POSIX, pass the renderer-side FD.
160 channel_handle.socket = base::FileDescriptor(channel->renderer_fd(), false); 160 channel_handle.socket =
161 base::FileDescriptor(channel->TakeClientFileDescriptor(), true);
161 #endif 162 #endif
162 channel->set_incognito(incognito); 163 channel->set_incognito(incognito);
163 } 164 }
164 165
165 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); 166 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle));
166 } 167 }
167 168
168 void PluginThread::OnNotifyRenderersOfPendingShutdown() { 169 void PluginThread::OnNotifyRenderersOfPendingShutdown() {
169 PluginChannel::NotifyRenderersOfPendingShutdown(); 170 PluginChannel::NotifyRenderersOfPendingShutdown();
170 } 171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698