| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class ChildProcessHostDelegate; | 24 class ChildProcessHostDelegate; |
| 25 | 25 |
| 26 // Provides common functionality for hosting a child process and processing IPC | 26 // Provides common functionality for hosting a child process and processing IPC |
| 27 // messages between the host and the child process. Users are responsible | 27 // messages between the host and the child process. Users are responsible |
| 28 // for the actual launching and terminating of the child processes. | 28 // for the actual launching and terminating of the child processes. |
| 29 class CONTENT_EXPORT ChildProcessHostImpl : public ChildProcessHost, | 29 class CONTENT_EXPORT ChildProcessHostImpl : public ChildProcessHost, |
| 30 public IPC::Listener { | 30 public IPC::Listener { |
| 31 public: | 31 public: |
| 32 virtual ~ChildProcessHostImpl(); | 32 virtual ~ChildProcessHostImpl(); |
| 33 | 33 |
| 34 // This value is guaranteed to never be returned by |
| 35 // GenerateChildProcessUniqueId() below. |
| 36 static int kInvalidChildProcessId; |
| 37 |
| 34 // Public and static for reuse by RenderMessageFilter. | 38 // Public and static for reuse by RenderMessageFilter. |
| 35 static void AllocateSharedMemory( | 39 static void AllocateSharedMemory( |
| 36 uint32 buffer_size, base::ProcessHandle child_process, | 40 uint32 buffer_size, base::ProcessHandle child_process, |
| 37 base::SharedMemoryHandle* handle); | 41 base::SharedMemoryHandle* handle); |
| 38 | 42 |
| 39 // Returns a unique ID to identify a child process. On construction, this | 43 // Returns a unique ID to identify a child process. On construction, this |
| 40 // function will be used to generate the id_, but it is also used to generate | 44 // function will be used to generate the id_, but it is also used to generate |
| 41 // IDs for the RenderProcessHost, which doesn't inherit from us, and whose IDs | 45 // IDs for the RenderProcessHost, which doesn't inherit from us, and whose IDs |
| 42 // must be unique for all child processes. | 46 // must be unique for all child processes. |
| 43 // | 47 // |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // thread, we don't have a IPC::ChannelProxy and so we manage filters | 84 // thread, we don't have a IPC::ChannelProxy and so we manage filters |
| 81 // manually. | 85 // manually. |
| 82 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; | 86 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; |
| 83 | 87 |
| 84 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl); | 88 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl); |
| 85 }; | 89 }; |
| 86 | 90 |
| 87 } // namespace content | 91 } // namespace content |
| 88 | 92 |
| 89 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ | 93 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |