Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1860)

Side by Side Diff: content/browser/child_process_launcher.h

Issue 2686983003: Avoid a thread hop when initializing IPC to new processes (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/child_process_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CHILD_PROCESS_LAUNCHER_H_ 5 #ifndef CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_
6 #define CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ 6 #define CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // previous client. 126 // previous client.
127 Client* ReplaceClientForTest(Client* client); 127 Client* ReplaceClientForTest(Client* client);
128 128
129 private: 129 private:
130 friend class internal::ChildProcessLauncherHelper; 130 friend class internal::ChildProcessLauncherHelper;
131 131
132 void UpdateTerminationStatus(bool known_dead); 132 void UpdateTerminationStatus(bool known_dead);
133 133
134 // Notifies the client about the result of the operation. 134 // Notifies the client about the result of the operation.
135 void Notify(internal::ChildProcessLauncherHelper::Process process, 135 void Notify(internal::ChildProcessLauncherHelper::Process process,
136 mojo::edk::ScopedPlatformHandle server_handle,
137 int error_code); 136 int error_code);
138 137
139 Client* client_; 138 Client* client_;
140 BrowserThread::ID client_thread_id_; 139 BrowserThread::ID client_thread_id_;
141 140
142 // The process associated with this ChildProcessLauncher. Set in Notify by 141 // The process associated with this ChildProcessLauncher. Set in Notify by
143 // ChildProcessLauncherHelper once the process was started. 142 // ChildProcessLauncherHelper once the process was started.
144 internal::ChildProcessLauncherHelper::Process process_; 143 internal::ChildProcessLauncherHelper::Process process_;
145 144
146 base::TerminationStatus termination_status_; 145 base::TerminationStatus termination_status_;
147 int exit_code_; 146 int exit_code_;
148 bool starting_; 147 bool starting_;
149 std::unique_ptr<mojo::edk::PendingProcessConnection> pending_connection_;
150 const mojo::edk::ProcessErrorCallback process_error_callback_; 148 const mojo::edk::ProcessErrorCallback process_error_callback_;
151 149
152 // Controls whether the child process should be terminated on browser 150 // Controls whether the child process should be terminated on browser
153 // shutdown. Default behavior is to terminate the child. 151 // shutdown. Default behavior is to terminate the child.
154 const bool terminate_child_on_shutdown_; 152 const bool terminate_child_on_shutdown_;
155 153
156 scoped_refptr<internal::ChildProcessLauncherHelper> helper_; 154 scoped_refptr<internal::ChildProcessLauncherHelper> helper_;
157 155
158 base::WeakPtrFactory<ChildProcessLauncher> weak_factory_; 156 base::WeakPtrFactory<ChildProcessLauncher> weak_factory_;
159 157
160 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); 158 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher);
161 }; 159 };
162 160
163 } // namespace content 161 } // namespace content
164 162
165 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ 163 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698