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 | |
67 private: | 63 private: |
68 class Context; | 64 class Context; |
69 | 65 |
70 scoped_refptr<Context> context_; | 66 scoped_refptr<Context> context_; |
71 | 67 |
72 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); | 68 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
73 }; | 69 }; |
74 | 70 |
75 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 71 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
OLD | NEW |