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_BROWSER_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // checking if there is connection or not. Virtual for mocking out for tests. | 171 // checking if there is connection or not. Virtual for mocking out for tests. |
172 virtual bool HasConnection() const = 0; | 172 virtual bool HasConnection() const = 0; |
173 | 173 |
174 // Call this to allow queueing of IPC messages that are sent before the | 174 // Call this to allow queueing of IPC messages that are sent before the |
175 // process is launched. | 175 // process is launched. |
176 virtual void EnableSendQueue() = 0; | 176 virtual void EnableSendQueue() = 0; |
177 | 177 |
178 // Returns the renderer channel. | 178 // Returns the renderer channel. |
179 virtual IPC::ChannelProxy* GetChannel() = 0; | 179 virtual IPC::ChannelProxy* GetChannel() = 0; |
180 | 180 |
| 181 // Returns an IPC::Sender which tries to send messages immediately from the |
| 182 // calling thread. The returned Sender is owned by the RenderProcessHost. |
| 183 virtual IPC::Sender* GetImmediateSender() = 0; |
| 184 |
| 185 // Returns an IPC::Sender which always sends messages from the IO thread's |
| 186 // task queue. The returned Sender is owned by the RenderProcessHost. |
| 187 virtual IPC::Sender* GetIOThreadSender() = 0; |
| 188 |
181 // Adds a message filter to the IPC channel. | 189 // Adds a message filter to the IPC channel. |
182 virtual void AddFilter(BrowserMessageFilter* filter) = 0; | 190 virtual void AddFilter(BrowserMessageFilter* filter) = 0; |
183 | 191 |
184 // Try to shutdown the associated render process as fast as possible | 192 // Try to shutdown the associated render process as fast as possible |
185 virtual bool FastShutdownForPageCount(size_t count) = 0; | 193 virtual bool FastShutdownForPageCount(size_t count) = 0; |
186 | 194 |
187 // TODO(ananta) | 195 // TODO(ananta) |
188 // Revisit whether the virtual functions declared from here on need to be | 196 // Revisit whether the virtual functions declared from here on need to be |
189 // part of the interface. | 197 // part of the interface. |
190 virtual void SetIgnoreInputEvents(bool ignore_input_events) = 0; | 198 virtual void SetIgnoreInputEvents(bool ignore_input_events) = 0; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 static void SetMaxRendererProcessCount(size_t count); | 366 static void SetMaxRendererProcessCount(size_t count); |
359 | 367 |
360 // Returns the current maximum number of renderer process hosts kept by the | 368 // Returns the current maximum number of renderer process hosts kept by the |
361 // content module. | 369 // content module. |
362 static size_t GetMaxRendererProcessCount(); | 370 static size_t GetMaxRendererProcessCount(); |
363 }; | 371 }; |
364 | 372 |
365 } // namespace content. | 373 } // namespace content. |
366 | 374 |
367 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 375 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |