OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_MACH_BROKER_MAC_H_ | 5 #ifndef CONTENT_BROWSER_MACH_BROKER_MAC_H_ |
6 #define CONTENT_BROWSER_MACH_BROKER_MAC_H_ | 6 #define CONTENT_BROWSER_MACH_BROKER_MAC_H_ |
7 | 7 |
8 #include <mach/mach.h> | 8 #include <mach/mach.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // MUST acquire the lock given by GetLock() before calling this method (and | 62 // MUST acquire the lock given by GetLock() before calling this method (and |
63 // release the lock afterwards). | 63 // release the lock afterwards). |
64 void AddPlaceholderForPid(base::ProcessHandle pid, int child_process_id); | 64 void AddPlaceholderForPid(base::ProcessHandle pid, int child_process_id); |
65 | 65 |
66 // Implement |ProcessMetrics::PortProvider|. | 66 // Implement |ProcessMetrics::PortProvider|. |
67 mach_port_t TaskForPid(base::ProcessHandle process) const override; | 67 mach_port_t TaskForPid(base::ProcessHandle process) const override; |
68 | 68 |
69 // Implement |BrowserChildProcessObserver|. | 69 // Implement |BrowserChildProcessObserver|. |
70 void BrowserChildProcessHostDisconnected( | 70 void BrowserChildProcessHostDisconnected( |
71 const ChildProcessData& data) override; | 71 const ChildProcessData& data) override; |
72 void BrowserChildProcessCrashed(const ChildProcessData& data) override; | 72 void BrowserChildProcessCrashed(const ChildProcessData& data, |
| 73 int exit_code) override; |
73 | 74 |
74 // Implement |NotificationObserver|. | 75 // Implement |NotificationObserver|. |
75 void Observe(int type, | 76 void Observe(int type, |
76 const NotificationSource& source, | 77 const NotificationSource& source, |
77 const NotificationDetails& details) override; | 78 const NotificationDetails& details) override; |
78 | 79 |
79 private: | 80 private: |
80 friend class MachBrokerTest; | 81 friend class MachBrokerTest; |
81 friend class MachListenerThreadDelegate; | 82 friend class MachListenerThreadDelegate; |
82 friend struct DefaultSingletonTraits<MachBroker>; | 83 friend struct DefaultSingletonTraits<MachBroker>; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 118 |
118 // Mutex that guards |mach_map_| and |child_process_id_map_|. | 119 // Mutex that guards |mach_map_| and |child_process_id_map_|. |
119 mutable base::Lock lock_; | 120 mutable base::Lock lock_; |
120 | 121 |
121 DISALLOW_COPY_AND_ASSIGN(MachBroker); | 122 DISALLOW_COPY_AND_ASSIGN(MachBroker); |
122 }; | 123 }; |
123 | 124 |
124 } // namespace content | 125 } // namespace content |
125 | 126 |
126 #endif // CONTENT_BROWSER_MACH_BROKER_MAC_H_ | 127 #endif // CONTENT_BROWSER_MACH_BROKER_MAC_H_ |
OLD | NEW |