Chromium Code Reviews| Index: content/browser/renderer_host/browser_render_process_host.cc |
| =================================================================== |
| --- content/browser/renderer_host/browser_render_process_host.cc (revision 100953) |
| +++ content/browser/renderer_host/browser_render_process_host.cc (working copy) |
| @@ -564,6 +564,10 @@ |
| switches::kEnableMediaStream, |
| switches::kDisableFullScreen, |
| switches::kEnablePepperTesting, |
| +#if defined(OS_WIN) |
|
jam
2011/09/19 17:10:48
nit: this really isn't needed, no?
Cris Neckar
2011/09/20 01:22:15
Done.
|
| + switches::kAuditAllHandles, |
| + switches::kAuditHandles, |
| +#endif |
| #if defined(OS_MACOSX) |
| // Allow this to be set when invoking the browser and relayed along. |
| switches::kEnableSandboxLogging, |
| @@ -656,6 +660,15 @@ |
| return true; |
| } |
| +void BrowserRenderProcessHost::DumpHandles() { |
| +#if defined(OS_WIN) |
| + Send(new ChildProcessMsg_DumpHandles()); |
| + return; |
| +#endif |
| + |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| // This is a platform specific function for mapping a transport DIB given its id |
| TransportDIB* BrowserRenderProcessHost::MapTransportDIB( |
| TransportDIB::Id dib_id) { |
| @@ -755,6 +768,8 @@ |
| IPC_BEGIN_MESSAGE_MAP_EX(BrowserRenderProcessHost, msg, msg_is_ok) |
| IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest, |
| OnShutdownRequest) |
| + IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DumpHandlesDone, |
| + OnDumpHandlesDone) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, |
| SuddenTerminationChanged) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction, |
| @@ -870,6 +885,17 @@ |
| Send(new ChildProcessMsg_Shutdown()); |
| } |
| +void BrowserRenderProcessHost::OnDumpHandlesDone() { |
| + // When no other owners of this object, we can delete ourselves. |
|
jam
2011/09/19 17:10:48
you don't want to duplicate this code from RenderP
Cris Neckar
2011/09/20 01:22:15
Done.
|
| + if (listeners_.IsEmpty()) { |
| + NotificationService::current()->Notify( |
| + content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
| + Source<RenderProcessHost>(this), NotificationService::NoDetails()); |
| + MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| + deleting_soon_ = true; |
| + } |
| +} |
| + |
| void BrowserRenderProcessHost::SuddenTerminationChanged(bool enabled) { |
| set_sudden_termination_allowed(enabled); |
| } |