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_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ |
6 #define CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/files/scoped_file.h" | 10 #include "base/files/scoped_file.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 // processes like plugins, or an embedder could even use this for long lived | 33 // processes like plugins, or an embedder could even use this for long lived |
34 // processes that run independent of the browser process. | 34 // processes that run independent of the browser process. |
35 class CONTENT_EXPORT ChildProcessHost : public IPC::Sender { | 35 class CONTENT_EXPORT ChildProcessHost : public IPC::Sender { |
36 public: | 36 public: |
37 ~ChildProcessHost() override {} | 37 ~ChildProcessHost() override {} |
38 | 38 |
39 // This is a value never returned as the unique id of any child processes of | 39 // This is a value never returned as the unique id of any child processes of |
40 // any kind, including the values returned by RenderProcessHost::GetID(). | 40 // any kind, including the values returned by RenderProcessHost::GetID(). |
41 static int kInvalidUniqueID; | 41 static int kInvalidUniqueID; |
42 | 42 |
| 43 // This value is used as the tracing id of the browser process for identifying |
| 44 // cross-process shared memory segments when tracing. |
| 45 // Note: In single-process mode all the clients of tracing will use this id. |
| 46 static uint64_t kBrowserTracingProcessId; |
| 47 |
43 // Used to create a child process host. The delegate must outlive this object. | 48 // Used to create a child process host. The delegate must outlive this object. |
44 static ChildProcessHost* Create(ChildProcessHostDelegate* delegate); | 49 static ChildProcessHost* Create(ChildProcessHostDelegate* delegate); |
45 | 50 |
46 // These flags may be passed to GetChildPath in order to alter its behavior, | 51 // These flags may be passed to GetChildPath in order to alter its behavior, |
47 // causing it to return a child path more suited to a specific task. | 52 // causing it to return a child path more suited to a specific task. |
48 enum { | 53 enum { |
49 // No special behavior requested. | 54 // No special behavior requested. |
50 CHILD_NORMAL = 0, | 55 CHILD_NORMAL = 0, |
51 | 56 |
52 #if defined(OS_LINUX) | 57 #if defined(OS_LINUX) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 101 |
97 // Returns the service_manager::InterfaceProvider the process host can use to | 102 // Returns the service_manager::InterfaceProvider the process host can use to |
98 // bind | 103 // bind |
99 // interfaces exposed to it from the child. | 104 // interfaces exposed to it from the child. |
100 virtual service_manager::InterfaceProvider* GetRemoteInterfaces() = 0; | 105 virtual service_manager::InterfaceProvider* GetRemoteInterfaces() = 0; |
101 }; | 106 }; |
102 | 107 |
103 }; // namespace content | 108 }; // namespace content |
104 | 109 |
105 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ | 110 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ |
OLD | NEW |