OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Call this when the child process exits to know what happened to | 53 // Call this when the child process exits to know what happened to |
54 // it. |exit_code| is the exit code of the process if it exited | 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 | 55 // (e.g. status from waitpid if on posix, from GetExitCodeProcess on |
56 // Windows). |exit_code| may be NULL. | 56 // Windows). |exit_code| may be NULL. |
57 base::TerminationStatus GetChildTerminationStatus(int* exit_code); | 57 base::TerminationStatus GetChildTerminationStatus(int* exit_code); |
58 | 58 |
59 // 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 |
60 // this after the process has started. | 60 // this after the process has started. |
61 void SetProcessBackgrounded(bool background); | 61 void SetProcessBackgrounded(bool background); |
62 | 62 |
| 63 // Controls whether the child process should be terminated on browser |
| 64 // shutdown. |
| 65 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); |
| 66 |
63 private: | 67 private: |
64 class Context; | 68 class Context; |
65 | 69 |
66 scoped_refptr<Context> context_; | 70 scoped_refptr<Context> context_; |
67 | 71 |
68 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); | 72 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
69 }; | 73 }; |
70 | 74 |
71 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 75 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
OLD | NEW |