| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 5 #ifndef CHROME_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
| 6 #define CHROME_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 6 #define CHROME_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 CommandLine* cmd_line, | 43 CommandLine* cmd_line, |
| 44 Client* client); | 44 Client* client); |
| 45 ~ChildProcessLauncher(); | 45 ~ChildProcessLauncher(); |
| 46 | 46 |
| 47 // True if the process is being launched and so the handle isn't available. | 47 // True if the process is being launched and so the handle isn't available. |
| 48 bool IsStarting(); | 48 bool IsStarting(); |
| 49 | 49 |
| 50 // Getter for the process handle. Only call after the process has started. | 50 // Getter for the process handle. Only call after the process has started. |
| 51 base::ProcessHandle GetHandle(); | 51 base::ProcessHandle GetHandle(); |
| 52 | 52 |
| 53 // Call this when the process exits to know if a process crashed or not. | 53 // Call this when the child process exits to know what happened to |
| 54 bool DidProcessCrash(); | 54 // it. |exit_code| is the exit code of the process if it exited |
| 55 // (e.g. status from waitpid if on posix, from GetExitCodeProcess on |
| 56 // Windows). |exit_code| may be NULL. |
| 57 base::TerminationStatus GetChildTerminationStatus(int* exit_code); |
| 55 | 58 |
| 56 // Changes whether the process runs in the background or not. Only call | 59 // Changes whether the process runs in the background or not. Only call |
| 57 // this after the process has started. | 60 // this after the process has started. |
| 58 void SetProcessBackgrounded(bool background); | 61 void SetProcessBackgrounded(bool background); |
| 59 | 62 |
| 60 private: | 63 private: |
| 61 class Context; | 64 class Context; |
| 62 | 65 |
| 63 scoped_refptr<Context> context_; | 66 scoped_refptr<Context> context_; |
| 64 | 67 |
| 65 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); | 68 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
| 66 }; | 69 }; |
| 67 | 70 |
| 68 #endif // CHROME_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 71 #endif // CHROME_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
| OLD | NEW |