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/kill.h" | 10 #include "base/process/kill.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 int* exit_code); | 69 int* exit_code); |
70 | 70 |
71 // Changes whether the process runs in the background or not. Only call | 71 // Changes whether the process runs in the background or not. Only call |
72 // this after the process has started. | 72 // this after the process has started. |
73 void SetProcessBackgrounded(bool background); | 73 void SetProcessBackgrounded(bool background); |
74 | 74 |
75 // Controls whether the child process should be terminated on browser | 75 // Controls whether the child process should be terminated on browser |
76 // shutdown. | 76 // shutdown. |
77 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); | 77 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); |
78 | 78 |
| 79 // Replaces the ChildProcessLauncher::Client for testing purposes. Returns the |
| 80 // previous client. |
| 81 Client* ReplaceClientForTest(Client* client); |
| 82 |
79 private: | 83 private: |
80 class Context; | 84 class Context; |
81 | 85 |
82 scoped_refptr<Context> context_; | 86 scoped_refptr<Context> context_; |
83 | 87 |
84 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); | 88 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
85 }; | 89 }; |
86 | 90 |
87 } // namespace content | 91 } // namespace content |
88 | 92 |
89 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 93 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
OLD | NEW |