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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
(...skipping 12 matching lines...) Expand all Loading... | |
23 } | 23 } |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 class BrowserContext; | 26 class BrowserContext; |
27 class BrowserMessageFilter; | 27 class BrowserMessageFilter; |
28 class RenderProcessHostObserver; | 28 class RenderProcessHostObserver; |
29 class RenderWidgetHost; | 29 class RenderWidgetHost; |
30 class StoragePartition; | 30 class StoragePartition; |
31 struct GlobalRequestID; | 31 struct GlobalRequestID; |
32 | 32 |
33 #if defined(ENABLE_WEBRTC) | |
34 enum RtpDumpType { | |
35 RTP_DUMP_INCOMING, | |
36 RTP_DUMP_OUTGOING, | |
37 RTP_DUMP_BOTH, | |
38 }; | |
39 #endif | |
40 | |
33 // Interface that represents the browser side of the browser <-> renderer | 41 // Interface that represents the browser side of the browser <-> renderer |
34 // communication channel. There will generally be one RenderProcessHost per | 42 // communication channel. There will generally be one RenderProcessHost per |
35 // renderer process. | 43 // renderer process. |
36 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, | 44 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
37 public IPC::Listener, | 45 public IPC::Listener, |
38 public base::SupportsUserData { | 46 public base::SupportsUserData { |
39 public: | 47 public: |
40 typedef IDMap<RenderProcessHost>::iterator iterator; | 48 typedef IDMap<RenderProcessHost>::iterator iterator; |
41 | 49 |
42 // Details for RENDERER_PROCESS_CLOSED notifications. | 50 // Details for RENDERER_PROCESS_CLOSED notifications. |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 | 206 |
199 #if defined(ENABLE_WEBRTC) | 207 #if defined(ENABLE_WEBRTC) |
200 virtual void EnableAecDump(const base::FilePath& file) = 0; | 208 virtual void EnableAecDump(const base::FilePath& file) = 0; |
201 virtual void DisableAecDump() = 0; | 209 virtual void DisableAecDump() = 0; |
202 | 210 |
203 // When set, |callback| receives log messages regarding, for example, media | 211 // When set, |callback| receives log messages regarding, for example, media |
204 // devices (webcams, mics, etc) that were initially requested in the render | 212 // devices (webcams, mics, etc) that were initially requested in the render |
205 // process associated with this RenderProcessHost. | 213 // process associated with this RenderProcessHost. |
206 virtual void SetWebRtcLogMessageCallback( | 214 virtual void SetWebRtcLogMessageCallback( |
207 base::Callback<void(const std::string&)> callback) = 0; | 215 base::Callback<void(const std::string&)> callback) = 0; |
216 | |
217 typedef base::Callback<void(const uint8* packet_header, | |
218 size_t header_length, | |
219 size_t packet_length, | |
220 bool incoming)> WebRtcRtpPacketCallback; | |
221 | |
222 typedef base::Callback<void(RtpDumpType)> WebRtcStopRtpDumpCallback; | |
223 | |
224 // Starts passing RTP packets to |packet_callback| and returns the callback | |
225 // used to stop dumping. This method can be called on any thread. The returned | |
jam
2014/05/16 22:03:22
can you clarify what you mean by "called on any th
jiayl
2014/05/16 22:52:43
Improved the comment.
| |
226 // WebRtcStopRtpDumpCallback must be called on the IO thread. | |
227 virtual WebRtcStopRtpDumpCallback StartRtpDump( | |
228 RtpDumpType, | |
jam
2014/05/16 22:03:22
can you keep it as with booleans as before for inc
jiayl
2014/05/16 22:52:43
Done.
| |
229 const WebRtcRtpPacketCallback& packet_callback) = 0; | |
208 #endif | 230 #endif |
209 | 231 |
210 // Tells the ResourceDispatcherHost to resume a deferred navigation without | 232 // Tells the ResourceDispatcherHost to resume a deferred navigation without |
211 // transferring it to a new renderer process. | 233 // transferring it to a new renderer process. |
212 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) = 0; | 234 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) = 0; |
213 | 235 |
214 // Notifies the renderer that the timezone configuration of the system might | 236 // Notifies the renderer that the timezone configuration of the system might |
215 // have changed. | 237 // have changed. |
216 virtual void NotifyTimezoneChange() = 0; | 238 virtual void NotifyTimezoneChange() = 0; |
217 | 239 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
266 static void SetMaxRendererProcessCount(size_t count); | 288 static void SetMaxRendererProcessCount(size_t count); |
267 | 289 |
268 // Returns the current max number of renderer processes used by the content | 290 // Returns the current max number of renderer processes used by the content |
269 // module. | 291 // module. |
270 static size_t GetMaxRendererProcessCount(); | 292 static size_t GetMaxRendererProcessCount(); |
271 }; | 293 }; |
272 | 294 |
273 } // namespace content. | 295 } // namespace content. |
274 | 296 |
275 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 297 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |