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

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

Issue 7053008: Revert 86532 - Revert 86517 - Don't terminate plugin processes from the browser during browser sh... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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
224 content::GetContentClient()->browser()->PluginProcessHostCreated(this); 230 content::GetContentClient()->browser()->PluginProcessHostCreated(this);
225 AddFilter(new ResolveProxyMsgHelper(NULL)); 231 AddFilter(new ResolveProxyMsgHelper(NULL));
226 232
227 return true; 233 return true;
228 } 234 }
229 235
230 void PluginProcessHost::ForceShutdown() { 236 void PluginProcessHost::ForceShutdown() {
231 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 237 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
232 Send(new PluginProcessMsg_NotifyRenderersOfPendingShutdown()); 238 Send(new PluginProcessMsg_NotifyRenderersOfPendingShutdown());
233 BrowserChildProcessHost::ForceShutdown(); 239 BrowserChildProcessHost::ForceShutdown();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 327 }
322 } 328 }
323 329
324 void PluginProcessHost::OnChannelCreated( 330 void PluginProcessHost::OnChannelCreated(
325 const IPC::ChannelHandle& channel_handle) { 331 const IPC::ChannelHandle& channel_handle) {
326 Client* client = sent_requests_.front(); 332 Client* client = sent_requests_.front();
327 333
328 client->OnChannelOpened(channel_handle); 334 client->OnChannelOpened(channel_handle);
329 sent_requests_.pop(); 335 sent_requests_.pop();
330 } 336 }
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