OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_SERVICE_SERVICE_CHILD_PROCESS_HOST_H_ | 5 #ifndef CHROME_SERVICE_SERVICE_CHILD_PROCESS_HOST_H_ |
6 #define CHROME_SERVICE_SERVICE_CHILD_PROCESS_HOST_H_ | 6 #define CHROME_SERVICE_SERVICE_CHILD_PROCESS_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/process.h" | 9 #include "base/process.h" |
10 #include "chrome/common/child_process_host.h" | 10 #include "content/common/child_process_host.h" |
11 #include "chrome/common/child_process_info.h" | 11 #include "content/common/child_process_info.h" |
12 | 12 |
13 | 13 |
14 // Plugins/workers and other child processes that live on the IO thread should | 14 // Plugins/workers and other child processes that live on the IO thread should |
15 // derive from this class. | 15 // derive from this class. |
16 // | 16 // |
17 class ServiceChildProcessHost : public ChildProcessHost, | 17 class ServiceChildProcessHost : public ChildProcessHost, |
18 public ChildProcessInfo { | 18 public ChildProcessInfo { |
19 public: | 19 public: |
20 virtual ~ServiceChildProcessHost(); | 20 virtual ~ServiceChildProcessHost(); |
21 | 21 |
22 protected: | 22 protected: |
23 explicit ServiceChildProcessHost(ProcessType type); | 23 explicit ServiceChildProcessHost(ProcessType type); |
24 // Derived classes call this to launch the child process synchronously. | 24 // Derived classes call this to launch the child process synchronously. |
25 // TODO(sanjeevr): Determine whether we need to make the launch asynchronous. | 25 // TODO(sanjeevr): Determine whether we need to make the launch asynchronous. |
26 // |exposed_dir| is the path to tbe exposed to the sandbox. This is ignored | 26 // |exposed_dir| is the path to tbe exposed to the sandbox. This is ignored |
27 // if |no_sandbox| is true. | 27 // if |no_sandbox| is true. |
28 bool Launch(CommandLine* cmd_line, | 28 bool Launch(CommandLine* cmd_line, |
29 bool no_sandbox, | 29 bool no_sandbox, |
30 const FilePath& exposed_dir); | 30 const FilePath& exposed_dir); |
31 }; | 31 }; |
32 | 32 |
33 #endif // CHROME_SERVICE_SERVICE_CHILD_PROCESS_HOST_H_ | 33 #endif // CHROME_SERVICE_SERVICE_CHILD_PROCESS_HOST_H_ |
34 | 34 |
OLD | NEW |