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 10 matching lines...) Expand all Loading... |
21 #include "ui/gfx/gpu_memory_buffer.h" | 21 #include "ui/gfx/gpu_memory_buffer.h" |
22 | 22 |
23 namespace base { | 23 namespace base { |
24 class FilePath; | 24 class FilePath; |
25 } | 25 } |
26 | 26 |
27 namespace IPC { | 27 namespace IPC { |
28 class MessageFilter; | 28 class MessageFilter; |
29 } | 29 } |
30 | 30 |
| 31 namespace gpu { |
| 32 struct SyncToken; |
| 33 } |
| 34 |
31 namespace content { | 35 namespace content { |
32 class ChildProcessHostDelegate; | 36 class ChildProcessHostDelegate; |
33 | 37 |
34 // Provides common functionality for hosting a child process and processing IPC | 38 // Provides common functionality for hosting a child process and processing IPC |
35 // messages between the host and the child process. Users are responsible | 39 // messages between the host and the child process. Users are responsible |
36 // for the actual launching and terminating of the child processes. | 40 // for the actual launching and terminating of the child processes. |
37 class CONTENT_EXPORT ChildProcessHostImpl : public ChildProcessHost, | 41 class CONTENT_EXPORT ChildProcessHostImpl : public ChildProcessHost, |
38 public IPC::Listener { | 42 public IPC::Listener { |
39 public: | 43 public: |
40 ~ChildProcessHostImpl() override; | 44 ~ChildProcessHostImpl() override; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 void OnShutdownRequest(); | 98 void OnShutdownRequest(); |
95 void OnAllocateSharedMemory(uint32 buffer_size, | 99 void OnAllocateSharedMemory(uint32 buffer_size, |
96 base::SharedMemoryHandle* handle); | 100 base::SharedMemoryHandle* handle); |
97 void OnAllocateGpuMemoryBuffer(gfx::GpuMemoryBufferId id, | 101 void OnAllocateGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
98 uint32 width, | 102 uint32 width, |
99 uint32 height, | 103 uint32 height, |
100 gfx::BufferFormat format, | 104 gfx::BufferFormat format, |
101 gfx::BufferUsage usage, | 105 gfx::BufferUsage usage, |
102 gfx::GpuMemoryBufferHandle* handle); | 106 gfx::GpuMemoryBufferHandle* handle); |
103 void OnDeletedGpuMemoryBuffer(gfx::GpuMemoryBufferId id, | 107 void OnDeletedGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
104 uint32 sync_point); | 108 const gpu::SyncToken& sync_token); |
105 | 109 |
106 ChildProcessHostDelegate* delegate_; | 110 ChildProcessHostDelegate* delegate_; |
107 base::Process peer_process_; | 111 base::Process peer_process_; |
108 bool opening_channel_; // True while we're waiting the channel to be opened. | 112 bool opening_channel_; // True while we're waiting the channel to be opened. |
109 scoped_ptr<IPC::Channel> channel_; | 113 scoped_ptr<IPC::Channel> channel_; |
110 std::string channel_id_; | 114 std::string channel_id_; |
111 | 115 |
112 // Holds all the IPC message filters. Since this object lives on the IO | 116 // Holds all the IPC message filters. Since this object lives on the IO |
113 // thread, we don't have a IPC::ChannelProxy and so we manage filters | 117 // thread, we don't have a IPC::ChannelProxy and so we manage filters |
114 // manually. | 118 // manually. |
115 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; | 119 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; |
116 | 120 |
117 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl); | 121 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl); |
118 }; | 122 }; |
119 | 123 |
120 } // namespace content | 124 } // namespace content |
121 | 125 |
122 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ | 126 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ |
OLD | NEW |