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

Side by Side Diff: content/browser/plugin_process_host.cc

Issue 7065048: Revert 86517 - Don't terminate plugin processes from the browser during browser shutdown. This is... (Closed) Base URL: svn://svn.chromium.org/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/browser/child_process_launcher.cc ('k') | content/plugin/plugin_channel.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) 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/browser/plugin_process_host.h" 5 #include "content/browser/plugin_process_host.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <utility> // for pair<> 10 #include <utility> // for pair<>
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 Launch( 215 Launch(
216 #if defined(OS_WIN) 216 #if defined(OS_WIN)
217 FilePath(), 217 FilePath(),
218 #elif defined(OS_POSIX) 218 #elif defined(OS_POSIX)
219 false, 219 false,
220 env, 220 env,
221 #endif 221 #endif
222 cmd_line); 222 cmd_line);
223 223
224 // The plugin needs to be shutdown gracefully, i.e. NP_Shutdown needs to be
225 // called on the plugin. The plugin process exits when it receives the
226 // OnChannelError notification indicating that the browser plugin channel has
227 // been destroyed.
228 SetTerminateChildOnShutdown(false);
229
230 content::GetContentClient()->browser()->PluginProcessHostCreated(this); 224 content::GetContentClient()->browser()->PluginProcessHostCreated(this);
231 AddFilter(new ResolveProxyMsgHelper(NULL)); 225 AddFilter(new ResolveProxyMsgHelper(NULL));
232 226
233 return true; 227 return true;
234 } 228 }
235 229
236 void PluginProcessHost::ForceShutdown() { 230 void PluginProcessHost::ForceShutdown() {
237 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 231 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
238 Send(new PluginProcessMsg_NotifyRenderersOfPendingShutdown()); 232 Send(new PluginProcessMsg_NotifyRenderersOfPendingShutdown());
239 BrowserChildProcessHost::ForceShutdown(); 233 BrowserChildProcessHost::ForceShutdown();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 321 }
328 } 322 }
329 323
330 void PluginProcessHost::OnChannelCreated( 324 void PluginProcessHost::OnChannelCreated(
331 const IPC::ChannelHandle& channel_handle) { 325 const IPC::ChannelHandle& channel_handle) {
332 Client* client = sent_requests_.front(); 326 Client* client = sent_requests_.front();
333 327
334 client->OnChannelOpened(channel_handle); 328 client->OnChannelOpened(channel_handle);
335 sent_requests_.pop(); 329 sent_requests_.pop();
336 } 330 }
OLDNEW
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | content/plugin/plugin_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698