OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CONTENT_COMMON_CHILD_PROCESS_HOST_H_ |
6 #define CONTENT_COMMON_CHILD_PROCESS_HOST_H_ | 6 #define CONTENT_COMMON_CHILD_PROCESS_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 static FilePath GetChildPath(int flags); | 86 static FilePath GetChildPath(int flags); |
87 | 87 |
88 #if defined(OS_WIN) | 88 #if defined(OS_WIN) |
89 // See comments in the cc file. This is a common hack needed for a process | 89 // See comments in the cc file. This is a common hack needed for a process |
90 // hosting a sandboxed child process. Hence it lives in this file. | 90 // hosting a sandboxed child process. Hence it lives in this file. |
91 static void PreCacheFont(LOGFONT font, int pid); | 91 static void PreCacheFont(LOGFONT font, int pid); |
92 static void ReleaseCachedFonts(int pid); | 92 static void ReleaseCachedFonts(int pid); |
93 #endif // defined(OS_WIN) | 93 #endif // defined(OS_WIN) |
94 | 94 |
95 // IPC::Message::Sender implementation. | 95 // IPC::Message::Sender implementation. |
96 virtual bool Send(IPC::Message* message); | 96 virtual bool Send(IPC::Message* message) OVERRIDE; |
97 | 97 |
98 // Adds an IPC message filter. A reference will be kept to the filter. | 98 // Adds an IPC message filter. A reference will be kept to the filter. |
99 void AddFilter(IPC::ChannelProxy::MessageFilter* filter); | 99 void AddFilter(IPC::ChannelProxy::MessageFilter* filter); |
100 | 100 |
101 // Public and static for reuse by RenderMessageFilter. | 101 // Public and static for reuse by RenderMessageFilter. |
102 static void OnAllocateSharedMemory( | 102 static void OnAllocateSharedMemory( |
103 uint32 buffer_size, base::ProcessHandle child_process, | 103 uint32 buffer_size, base::ProcessHandle child_process, |
104 base::SharedMemoryHandle* handle); | 104 base::SharedMemoryHandle* handle); |
105 | 105 |
106 protected: | 106 protected: |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 // Holds all the IPC message filters. Since this object lives on the IO | 201 // Holds all the IPC message filters. Since this object lives on the IO |
202 // thread, we don't have a IPC::ChannelProxy and so we manage filters | 202 // thread, we don't have a IPC::ChannelProxy and so we manage filters |
203 // manually. | 203 // manually. |
204 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; | 204 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; |
205 | 205 |
206 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); | 206 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); |
207 }; | 207 }; |
208 | 208 |
209 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_H_ | 209 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_H_ |
OLD | NEW |