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_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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 Client* client); | 47 Client* client); |
48 ~ChildProcessLauncher(); | 48 ~ChildProcessLauncher(); |
49 | 49 |
50 // True if the process is being launched and so the handle isn't available. | 50 // True if the process is being launched and so the handle isn't available. |
51 bool IsStarting(); | 51 bool IsStarting(); |
52 | 52 |
53 // Getter for the process handle. Only call after the process has started. | 53 // Getter for the process handle. Only call after the process has started. |
54 base::ProcessHandle GetHandle(); | 54 base::ProcessHandle GetHandle(); |
55 | 55 |
56 // Call this when the child process exits to know what happened to | 56 // Call this when the child process exits to know what happened to |
57 // it. |exit_code| is the exit code of the process if it exited | 57 // it. |
agl
2012/12/04 15:27:55
looks like "it" fits on the previous line.
jln (very slow on Chromium)
2012/12/04 20:01:25
Done.
| |
58 // (e.g. status from waitpid if on posix, from GetExitCodeProcess on | 58 // |known_dead| can be true if we do already know the process is dead as it |
agl
2012/12/04 15:27:55
s/do //
jln (very slow on Chromium)
2012/12/04 20:01:25
Done.
| |
59 // Windows). |exit_code| may be NULL. | 59 // can help the implemention figure the proper TerminationStatus. |
60 base::TerminationStatus GetChildTerminationStatus(int* exit_code); | 60 // |exit_code| is the exit code of the process if it exited (e.g. status from |
61 // waitpid if on posix, from GetExitCodeProcess on Windows). |exit_code| may | |
62 // be NULL. | |
63 base::TerminationStatus GetChildTerminationStatus(bool known_dead, | |
64 int* exit_code); | |
61 | 65 |
62 // Changes whether the process runs in the background or not. Only call | 66 // Changes whether the process runs in the background or not. Only call |
63 // this after the process has started. | 67 // this after the process has started. |
64 void SetProcessBackgrounded(bool background); | 68 void SetProcessBackgrounded(bool background); |
65 | 69 |
66 // Controls whether the child process should be terminated on browser | 70 // Controls whether the child process should be terminated on browser |
67 // shutdown. | 71 // shutdown. |
68 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); | 72 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); |
69 | 73 |
70 private: | 74 private: |
71 class Context; | 75 class Context; |
72 | 76 |
73 scoped_refptr<Context> context_; | 77 scoped_refptr<Context> context_; |
74 | 78 |
75 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); | 79 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
76 }; | 80 }; |
77 | 81 |
78 } // namespace content | 82 } // namespace content |
79 | 83 |
80 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 84 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
OLD | NEW |