OLD | NEW |
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/mach_broker_mac.h" | 5 #include "content/browser/mach_broker_mac.h" |
6 | 6 |
7 #include <bsm/libbsm.h> | 7 #include <bsm/libbsm.h> |
8 #include <servers/bootstrap.h> | 8 #include <servers/bootstrap.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 if (it == mach_map_.end()) | 210 if (it == mach_map_.end()) |
211 return MACH_PORT_NULL; | 211 return MACH_PORT_NULL; |
212 return it->second; | 212 return it->second; |
213 } | 213 } |
214 | 214 |
215 void MachBroker::BrowserChildProcessHostDisconnected( | 215 void MachBroker::BrowserChildProcessHostDisconnected( |
216 const ChildProcessData& data) { | 216 const ChildProcessData& data) { |
217 InvalidateChildProcessId(data.id); | 217 InvalidateChildProcessId(data.id); |
218 } | 218 } |
219 | 219 |
220 void MachBroker::BrowserChildProcessCrashed(const ChildProcessData& data) { | 220 void MachBroker::BrowserChildProcessCrashed(const ChildProcessData& data, |
| 221 int exit_code) { |
221 InvalidateChildProcessId(data.id); | 222 InvalidateChildProcessId(data.id); |
222 } | 223 } |
223 | 224 |
224 void MachBroker::Observe(int type, | 225 void MachBroker::Observe(int type, |
225 const NotificationSource& source, | 226 const NotificationSource& source, |
226 const NotificationDetails& details) { | 227 const NotificationDetails& details) { |
227 switch (type) { | 228 switch (type) { |
228 case NOTIFICATION_RENDERER_PROCESS_TERMINATED: | 229 case NOTIFICATION_RENDERER_PROCESS_TERMINATED: |
229 case NOTIFICATION_RENDERER_PROCESS_CLOSED: { | 230 case NOTIFICATION_RENDERER_PROCESS_CLOSED: { |
230 RenderProcessHost* host = Source<RenderProcessHost>(source).ptr(); | 231 RenderProcessHost* host = Source<RenderProcessHost>(source).ptr(); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 NotificationService::AllBrowserContextsAndSources()); | 292 NotificationService::AllBrowserContextsAndSources()); |
292 registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED, | 293 registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
293 NotificationService::AllBrowserContextsAndSources()); | 294 NotificationService::AllBrowserContextsAndSources()); |
294 | 295 |
295 // No corresponding StopObservingBrowserChildProcesses, | 296 // No corresponding StopObservingBrowserChildProcesses, |
296 // we leak this singleton. | 297 // we leak this singleton. |
297 BrowserChildProcessObserver::Add(this); | 298 BrowserChildProcessObserver::Add(this); |
298 } | 299 } |
299 | 300 |
300 } // namespace content | 301 } // namespace content |
OLD | NEW |