| 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 29 matching lines...) Expand all Loading... |
| 40 /// class because it lives on the UI thread. | 40 /// class because it lives on the UI thread. |
| 41 class CONTENT_EXPORT BrowserChildProcessHostImpl | 41 class CONTENT_EXPORT BrowserChildProcessHostImpl |
| 42 : public BrowserChildProcessHost, | 42 : public BrowserChildProcessHost, |
| 43 public NON_EXPORTED_BASE(ChildProcessHostDelegate), | 43 public NON_EXPORTED_BASE(ChildProcessHostDelegate), |
| 44 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 45 public base::win::ObjectWatcher::Delegate, | 45 public base::win::ObjectWatcher::Delegate, |
| 46 #endif | 46 #endif |
| 47 public ChildProcessLauncher::Client { | 47 public ChildProcessLauncher::Client { |
| 48 public: | 48 public: |
| 49 BrowserChildProcessHostImpl(content::ProcessType process_type, | 49 BrowserChildProcessHostImpl(content::ProcessType process_type, |
| 50 BrowserChildProcessHostDelegate* delegate); | 50 BrowserChildProcessHostDelegate* delegate, |
| 51 const std::string& mojo_child_token); |
| 51 ~BrowserChildProcessHostImpl() override; | 52 ~BrowserChildProcessHostImpl() override; |
| 52 | 53 |
| 53 // Terminates all child processes and deletes each BrowserChildProcessHost | 54 // Terminates all child processes and deletes each BrowserChildProcessHost |
| 54 // instance. | 55 // instance. |
| 55 static void TerminateAll(); | 56 static void TerminateAll(); |
| 56 | 57 |
| 57 // Copies kEnableFeatures and kDisableFeatures to the command line. Generates | 58 // Copies kEnableFeatures and kDisableFeatures to the command line. Generates |
| 58 // them from the FeatureList override state, to take into account overrides | 59 // them from the FeatureList override state, to take into account overrides |
| 59 // from FieldTrials. | 60 // from FieldTrials. |
| 60 static void CopyFeatureAndFieldTrialFlags(base::CommandLine* cmd_line); | 61 static void CopyFeatureAndFieldTrialFlags(base::CommandLine* cmd_line); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 bool IsProcessLaunched() const; | 118 bool IsProcessLaunched() const; |
| 118 | 119 |
| 119 #if defined(OS_WIN) | 120 #if defined(OS_WIN) |
| 120 // ObjectWatcher::Delegate implementation. | 121 // ObjectWatcher::Delegate implementation. |
| 121 void OnObjectSignaled(HANDLE object) override; | 122 void OnObjectSignaled(HANDLE object) override; |
| 122 #endif | 123 #endif |
| 123 | 124 |
| 124 ChildProcessData data_; | 125 ChildProcessData data_; |
| 125 BrowserChildProcessHostDelegate* delegate_; | 126 BrowserChildProcessHostDelegate* delegate_; |
| 126 std::unique_ptr<ChildProcessHost> child_process_host_; | 127 std::unique_ptr<ChildProcessHost> child_process_host_; |
| 128 const std::string mojo_child_token_; |
| 127 | 129 |
| 128 std::unique_ptr<ChildProcessLauncher> child_process_; | 130 std::unique_ptr<ChildProcessLauncher> child_process_; |
| 129 | 131 |
| 130 PowerMonitorMessageBroadcaster power_monitor_message_broadcaster_; | 132 PowerMonitorMessageBroadcaster power_monitor_message_broadcaster_; |
| 131 | 133 |
| 132 #if defined(OS_WIN) | 134 #if defined(OS_WIN) |
| 133 // Watches to see if the child process exits before the IPC channel has | 135 // Watches to see if the child process exits before the IPC channel has |
| 134 // been connected. Thereafter, its exit is determined by an error on the | 136 // been connected. Thereafter, its exit is determined by an error on the |
| 135 // IPC channel. | 137 // IPC channel. |
| 136 base::win::ObjectWatcher early_exit_watcher_; | 138 base::win::ObjectWatcher early_exit_watcher_; |
| 137 #endif | 139 #endif |
| 138 | 140 |
| 139 bool is_channel_connected_; | 141 bool is_channel_connected_; |
| 140 bool notify_child_disconnected_; | 142 bool notify_child_disconnected_; |
| 141 }; | 143 }; |
| 142 | 144 |
| 143 } // namespace content | 145 } // namespace content |
| 144 | 146 |
| 145 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 147 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |