Chromium Code Reviews| 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_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 | 113 |
| 114 ChildConnection* child_connection() const { | 114 ChildConnection* child_connection() const { |
| 115 return child_connection_.get(); | 115 return child_connection_.get(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 typedef std::list<BrowserChildProcessHostImpl*> BrowserChildProcessList; | 118 typedef std::list<BrowserChildProcessHostImpl*> BrowserChildProcessList; |
| 119 private: | 119 private: |
| 120 friend class BrowserChildProcessHostIterator; | 120 friend class BrowserChildProcessHostIterator; |
| 121 friend class BrowserChildProcessObserver; | 121 friend class BrowserChildProcessObserver; |
| 122 | 122 |
| 123 class ConnectionFilterImpl; | |
|
blundell
2016/10/25 16:53:44
nit: necessary?
ke.he
2016/10/26 10:01:51
Done.
| |
| 124 | |
| 123 static BrowserChildProcessList* GetIterator(); | 125 static BrowserChildProcessList* GetIterator(); |
| 124 | 126 |
| 125 static void AddObserver(BrowserChildProcessObserver* observer); | 127 static void AddObserver(BrowserChildProcessObserver* observer); |
| 126 static void RemoveObserver(BrowserChildProcessObserver* observer); | 128 static void RemoveObserver(BrowserChildProcessObserver* observer); |
| 127 | 129 |
| 128 // Creates the |metrics_allocator_|. | 130 // Creates the |metrics_allocator_|. |
| 129 void CreateMetricsAllocator(); | 131 void CreateMetricsAllocator(); |
| 130 | 132 |
| 131 // Passes the |metrics_allocator_|, if any, to the managed process. This | 133 // Passes the |metrics_allocator_|, if any, to the managed process. This |
| 132 // requires the process to have been launched and the IPC channel to be | 134 // requires the process to have been launched and the IPC channel to be |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 153 | 155 |
| 154 ChildProcessData data_; | 156 ChildProcessData data_; |
| 155 BrowserChildProcessHostDelegate* delegate_; | 157 BrowserChildProcessHostDelegate* delegate_; |
| 156 std::unique_ptr<ChildProcessHost> child_process_host_; | 158 std::unique_ptr<ChildProcessHost> child_process_host_; |
| 157 | 159 |
| 158 const std::string child_token_; | 160 const std::string child_token_; |
| 159 std::unique_ptr<ChildConnection> child_connection_; | 161 std::unique_ptr<ChildConnection> child_connection_; |
| 160 | 162 |
| 161 std::unique_ptr<ChildProcessLauncher> child_process_; | 163 std::unique_ptr<ChildProcessLauncher> child_process_; |
| 162 | 164 |
| 163 PowerMonitorMessageBroadcaster power_monitor_message_broadcaster_; | |
| 164 | |
| 165 #if defined(OS_WIN) | 165 #if defined(OS_WIN) |
| 166 // Watches to see if the child process exits before the IPC channel has | 166 // Watches to see if the child process exits before the IPC channel has |
| 167 // been connected. Thereafter, its exit is determined by an error on the | 167 // been connected. Thereafter, its exit is determined by an error on the |
| 168 // IPC channel. | 168 // IPC channel. |
| 169 base::win::ObjectWatcher early_exit_watcher_; | 169 base::win::ObjectWatcher early_exit_watcher_; |
| 170 #endif | 170 #endif |
| 171 | 171 |
| 172 // The memory allocator, if any, in which the process will write its metrics. | 172 // The memory allocator, if any, in which the process will write its metrics. |
| 173 std::unique_ptr<base::SharedPersistentMemoryAllocator> metrics_allocator_; | 173 std::unique_ptr<base::SharedPersistentMemoryAllocator> metrics_allocator_; |
| 174 | 174 |
| 175 bool is_channel_connected_; | 175 bool is_channel_connected_; |
| 176 bool notify_child_disconnected_; | 176 bool notify_child_disconnected_; |
| 177 | 177 |
| 178 base::WeakPtrFactory<BrowserChildProcessHostImpl> weak_factory_; | 178 base::WeakPtrFactory<BrowserChildProcessHostImpl> weak_factory_; |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace content | 181 } // namespace content |
| 182 | 182 |
| 183 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 183 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |