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" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 | 12 |
13 class CommandLine; | 13 class CommandLine; |
14 | 14 |
| 15 namespace content { |
| 16 |
15 // Launches a process asynchronously and notifies the client of the process | 17 // Launches a process asynchronously and notifies the client of the process |
16 // handle when it's available. It's used to avoid blocking the calling thread | 18 // handle when it's available. It's used to avoid blocking the calling thread |
17 // on the OS since often it can take > 100 ms to create the process. | 19 // on the OS since often it can take > 100 ms to create the process. |
18 class CONTENT_EXPORT ChildProcessLauncher { | 20 class CONTENT_EXPORT ChildProcessLauncher { |
19 public: | 21 public: |
20 class CONTENT_EXPORT Client { | 22 class CONTENT_EXPORT Client { |
21 public: | 23 public: |
22 // Will be called on the thread that the ChildProcessLauncher was | 24 // Will be called on the thread that the ChildProcessLauncher was |
23 // constructed on. | 25 // constructed on. |
24 virtual void OnProcessLaunched() = 0; | 26 virtual void OnProcessLaunched() = 0; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); | 67 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); |
66 | 68 |
67 private: | 69 private: |
68 class Context; | 70 class Context; |
69 | 71 |
70 scoped_refptr<Context> context_; | 72 scoped_refptr<Context> context_; |
71 | 73 |
72 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); | 74 DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher); |
73 }; | 75 }; |
74 | 76 |
| 77 } // namespace content |
| 78 |
75 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ | 79 #endif // CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ |
OLD | NEW |