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

Side by Side Diff: content/public/common/child_process_host.h

Issue 126033004: Clean up ChildProcessHost unique id generation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: start from 1 Created 6 years, 11 months 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
« no previous file with comments | « content/public/browser/render_process_host.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PULIC_COMMON_CHILD_PROCESS_HOST_H_ 5 #ifndef CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_H_
6 #define CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_H_ 6 #define CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "ipc/ipc_channel_proxy.h" 10 #include "ipc/ipc_channel_proxy.h"
11 11
12 namespace base { 12 namespace base {
13 class FilePath; 13 class FilePath;
14 } 14 }
15 15
16 namespace content { 16 namespace content {
17 17
18 class ChildProcessHostDelegate; 18 class ChildProcessHostDelegate;
19 19
20 // This represents a non-browser process. This can include traditional child 20 // This represents a non-browser process. This can include traditional child
21 // processes like plugins, or an embedder could even use this for long lived 21 // processes like plugins, or an embedder could even use this for long lived
22 // processes that run independent of the browser process. 22 // processes that run independent of the browser process.
23 class CONTENT_EXPORT ChildProcessHost : public IPC::Sender { 23 class CONTENT_EXPORT ChildProcessHost : public IPC::Sender {
24 public: 24 public:
25 virtual ~ChildProcessHost() {} 25 virtual ~ChildProcessHost() {}
26 26
27 // This is a value never returned as the unique id of any child processes of
28 // any kind, including the values returned by RenderProcessHost::GetID().
29 static int kInvalidChildProcessUniqueId;
jam 2014/01/07 21:05:01 nit: ChildProcessHost::kInvalidChildProcessUniqueI
Avi (use Gerrit) 2014/01/07 21:47:47 Done.
Avi (use Gerrit) 2014/01/08 16:25:45 No, sorry. kInvalidID is used in the Mac headers a
30
27 // Used to create a child process host. The delegate must outlive this object. 31 // Used to create a child process host. The delegate must outlive this object.
28 static ChildProcessHost* Create( 32 static ChildProcessHost* Create(ChildProcessHostDelegate* delegate);
29 ChildProcessHostDelegate* delegate);
30 33
31 // These flags may be passed to GetChildPath in order to alter its behavior, 34 // These flags may be passed to GetChildPath in order to alter its behavior,
32 // causing it to return a child path more suited to a specific task. 35 // causing it to return a child path more suited to a specific task.
33 enum { 36 enum {
34 // No special behavior requested. 37 // No special behavior requested.
35 CHILD_NORMAL = 0, 38 CHILD_NORMAL = 0,
36 39
37 #if defined(OS_LINUX) 40 #if defined(OS_LINUX)
38 // Indicates that the child execed after forking may be execced from 41 // Indicates that the child execed after forking may be execced from
39 // /proc/self/exe rather than using the "real" app path. This prevents 42 // /proc/self/exe rather than using the "real" app path. This prevents
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 94
92 #if defined(OS_POSIX) 95 #if defined(OS_POSIX)
93 // See IPC::Channel::TakeClientFileDescriptor. 96 // See IPC::Channel::TakeClientFileDescriptor.
94 virtual int TakeClientFileDescriptor() = 0; 97 virtual int TakeClientFileDescriptor() = 0;
95 #endif 98 #endif
96 }; 99 };
97 100
98 }; // namespace content 101 }; // namespace content
99 102
100 #endif // CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_H_ 103 #endif // CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/public/browser/render_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698