| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_SERVICE_SERVICE_CHILD_PROCESS_HOST_H_ | |
| 6 #define CHROME_SERVICE_SERVICE_CHILD_PROCESS_HOST_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/process.h" | |
| 10 #include "content/common/child_process_host.h" | |
| 11 | |
| 12 class CommandLine; | |
| 13 | |
| 14 // Plugins/workers and other child processes that live on the IO thread should | |
| 15 // derive from this class. | |
| 16 // | |
| 17 class ServiceChildProcessHost : public ChildProcessHost { | |
| 18 public: | |
| 19 virtual ~ServiceChildProcessHost(); | |
| 20 | |
| 21 protected: | |
| 22 ServiceChildProcessHost(); | |
| 23 | |
| 24 // Derived classes call this to launch the child process synchronously. | |
| 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 | |
| 27 // if |no_sandbox| is true. | |
| 28 bool Launch(CommandLine* cmd_line, | |
| 29 bool no_sandbox, | |
| 30 const FilePath& exposed_dir); | |
| 31 | |
| 32 base::ProcessHandle handle() const { return handle_; } | |
| 33 | |
| 34 private: | |
| 35 base::ProcessHandle handle_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(ServiceChildProcessHost); | |
| 38 }; | |
| 39 | |
| 40 #endif // CHROME_SERVICE_SERVICE_CHILD_PROCESS_HOST_H_ | |
| OLD | NEW |