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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void BrowserChildProcessCrashed(const ChildProcessData& data, | 75 void BrowserChildProcessCrashed(const ChildProcessData& data, |
76 int exit_code) override; | 76 int exit_code) override; |
77 | 77 |
78 // Implement |NotificationObserver|. | 78 // Implement |NotificationObserver|. |
79 void Observe(int type, | 79 void Observe(int type, |
80 const NotificationSource& source, | 80 const NotificationSource& source, |
81 const NotificationDetails& details) override; | 81 const NotificationDetails& details) override; |
82 | 82 |
83 private: | 83 private: |
84 friend class MachBrokerTest; | 84 friend class MachBrokerTest; |
85 friend struct DefaultSingletonTraits<MachBroker>; | 85 friend struct base::DefaultSingletonTraits<MachBroker>; |
86 | 86 |
87 MachBroker(); | 87 MachBroker(); |
88 ~MachBroker() override; | 88 ~MachBroker() override; |
89 | 89 |
90 // Performs any initialization work. | 90 // Performs any initialization work. |
91 bool Init(); | 91 bool Init(); |
92 | 92 |
93 // Message handler that is invoked on |dispatch_source_| when an | 93 // Message handler that is invoked on |dispatch_source_| when an |
94 // incoming message needs to be received. | 94 // incoming message needs to be received. |
95 void HandleRequest(); | 95 void HandleRequest(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 // Mutex that guards |mach_map_| and |child_process_id_map_|. | 135 // Mutex that guards |mach_map_| and |child_process_id_map_|. |
136 mutable base::Lock lock_; | 136 mutable base::Lock lock_; |
137 | 137 |
138 DISALLOW_COPY_AND_ASSIGN(MachBroker); | 138 DISALLOW_COPY_AND_ASSIGN(MachBroker); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace content | 141 } // namespace content |
142 | 142 |
143 #endif // CONTENT_BROWSER_MACH_BROKER_MAC_H_ | 143 #endif // CONTENT_BROWSER_MACH_BROKER_MAC_H_ |
OLD | NEW |