Index: content/browser/child_process_launcher.h |
diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h |
index 7ce780551f462f9c458b730b9ed0ef3a1cadd03c..0fb0de9fc36e0a59ecdddc7c2490bdd4528945a1 100644 |
--- a/content/browser/child_process_launcher.h |
+++ b/content/browser/child_process_launcher.h |
@@ -36,24 +36,14 @@ class CONTENT_EXPORT ChildProcessLauncher { |
// the callback won't be called. If the process is still running by the time |
// this object destructs, it will be terminated. |
// Takes ownership of cmd_line. |
- ChildProcessLauncher( |
-#if defined(OS_WIN) |
- SandboxedProcessLauncherDelegate* delegate, |
-#elif defined(OS_POSIX) |
- bool use_zygote, |
- const base::EnvironmentMap& environ, |
- int ipcfd, |
-#endif |
- CommandLine* cmd_line, |
- int child_process_id, |
- Client* client); |
- ~ChildProcessLauncher(); |
+ ChildProcessLauncher() {}; |
+ virtual ~ChildProcessLauncher() {}; |
// True if the process is being launched and so the handle isn't available. |
- bool IsStarting(); |
+ virtual bool IsStarting() = 0; |
// Getter for the process handle. Only call after the process has started. |
- base::ProcessHandle GetHandle(); |
+ virtual base::ProcessHandle GetHandle() = 0; |
// Call this when the child process exits to know what happened to it. |
// |known_dead| can be true if we already know the process is dead as it can |
@@ -66,22 +56,39 @@ class CONTENT_EXPORT ChildProcessLauncher { |
// |exit_code| is the exit code of the process if it exited (e.g. status from |
// waitpid if on posix, from GetExitCodeProcess on Windows). |exit_code| may |
// be NULL. |
- base::TerminationStatus GetChildTerminationStatus(bool known_dead, |
- int* exit_code); |
+ virtual base::TerminationStatus GetChildTerminationStatus(bool known_dead, |
+ int* exit_code) = 0; |
// Changes whether the process runs in the background or not. Only call |
// this after the process has started. |
- void SetProcessBackgrounded(bool background); |
+ virtual void SetProcessBackgrounded(bool background) = 0; |
// Controls whether the child process should be terminated on browser |
// shutdown. |
- void SetTerminateChildOnShutdown(bool terminate_on_shutdown); |
+ virtual void SetTerminateChildOnShutdown(bool terminate_on_shutdown) = 0; |
- private: |
- class Context; |
+ // Create a standard ChildProcessLauncher. |
+ static ChildProcessLauncher* Create( |
+#if defined(OS_WIN) |
+ SandboxedProcessLauncherDelegate* delegate, |
+#elif defined(OS_POSIX) |
+ bool use_zygote, |
+ const base::EnvironmentMap& environ, |
+ int ipcfd, |
+#endif |
+ CommandLine* cmd_line, |
+ int child_process_id, |
+ Client* client); |
- scoped_refptr<Context> context_; |
+#if defined(OS_WIN) |
+ // Create a ChildProcessLauncher that attempts to create an elevated process. |
+ static ChildProcessLauncher* CreateElevated( |
+ CommandLine* cmd_line, |
+ int child_process_id, |
+ Client* client); |
+#endif |
+ private: |
DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
}; |