Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: chrome/service/service_child_process_host.h

Issue 8774040: Don't make classes derive from ChildProcessHost, and instead have them use it through composition... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698