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_COMMON_CHILD_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ |
6 #define CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 // Provides common functionality for hosting a child process and processing IPC | 36 // Provides common functionality for hosting a child process and processing IPC |
37 // messages between the host and the child process. Users are responsible | 37 // messages between the host and the child process. Users are responsible |
38 // for the actual launching and terminating of the child processes. | 38 // for the actual launching and terminating of the child processes. |
39 class CONTENT_EXPORT ChildProcessHostImpl : public ChildProcessHost, | 39 class CONTENT_EXPORT ChildProcessHostImpl : public ChildProcessHost, |
40 public IPC::Listener { | 40 public IPC::Listener { |
41 public: | 41 public: |
42 ~ChildProcessHostImpl() override; | 42 ~ChildProcessHostImpl() override; |
43 | 43 |
44 // Public and static for reuse by RenderMessageFilter. | 44 // Public and static for reuse by RenderMessageFilter. |
45 static void AllocateSharedMemory( | 45 static void AllocateSharedMemory( |
46 size_t buffer_size, base::ProcessHandle child_process, | 46 size_t buffer_size, |
47 base::SharedMemoryHandle* handle); | 47 base::SharedMemoryHandle* handle); |
48 | 48 |
49 // Returns a unique ID to identify a child process. On construction, this | 49 // Returns a unique ID to identify a child process. On construction, this |
50 // function will be used to generate the id_, but it is also used to generate | 50 // function will be used to generate the id_, but it is also used to generate |
51 // IDs for the RenderProcessHost, which doesn't inherit from us, and whose IDs | 51 // IDs for the RenderProcessHost, which doesn't inherit from us, and whose IDs |
52 // must be unique for all child processes. | 52 // must be unique for all child processes. |
53 // | 53 // |
54 // This function is threadsafe since RenderProcessHost is on the UI thread, | 54 // This function is threadsafe since RenderProcessHost is on the UI thread, |
55 // but normally this will be used on the IO thread. | 55 // but normally this will be used on the IO thread. |
56 // | 56 // |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // thread, we don't have a IPC::ChannelProxy and so we manage filters | 121 // thread, we don't have a IPC::ChannelProxy and so we manage filters |
122 // manually. | 122 // manually. |
123 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; | 123 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; |
124 | 124 |
125 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl); | 125 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl); |
126 }; | 126 }; |
127 | 127 |
128 } // namespace content | 128 } // namespace content |
129 | 129 |
130 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ | 130 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ |
OLD | NEW |