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 <list> | 8 #include <list> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // bad_message::BadMessageReceived() or an equivalent method outside of the | 92 // bad_message::BadMessageReceived() or an equivalent method outside of the |
93 // content module. | 93 // content module. |
94 virtual void ShutdownForBadMessage() = 0; | 94 virtual void ShutdownForBadMessage() = 0; |
95 | 95 |
96 // Track the count of visible widgets. Called by listeners to register and | 96 // Track the count of visible widgets. Called by listeners to register and |
97 // unregister visibility. | 97 // unregister visibility. |
98 virtual void WidgetRestored() = 0; | 98 virtual void WidgetRestored() = 0; |
99 virtual void WidgetHidden() = 0; | 99 virtual void WidgetHidden() = 0; |
100 virtual int VisibleWidgetCount() const = 0; | 100 virtual int VisibleWidgetCount() const = 0; |
101 | 101 |
| 102 // Called when the audio state changes for this render process host. |
| 103 virtual void AudioStateChanged() = 0; |
| 104 |
102 // Indicates whether the current RenderProcessHost is exclusively hosting | 105 // Indicates whether the current RenderProcessHost is exclusively hosting |
103 // guest RenderFrames. Not all guest RenderFrames are created equal. A guest, | 106 // guest RenderFrames. Not all guest RenderFrames are created equal. A guest, |
104 // as indicated by BrowserPluginGuest::IsGuest, may coexist with other | 107 // as indicated by BrowserPluginGuest::IsGuest, may coexist with other |
105 // non-guest RenderFrames in the same process if IsForGuestsOnly() is false. | 108 // non-guest RenderFrames in the same process if IsForGuestsOnly() is false. |
106 virtual bool IsForGuestsOnly() const = 0; | 109 virtual bool IsForGuestsOnly() const = 0; |
107 | 110 |
108 // Returns the storage partition associated with this process. | 111 // Returns the storage partition associated with this process. |
109 // | 112 // |
110 // TODO(nasko): Remove this function from the public API once | 113 // TODO(nasko): Remove this function from the public API once |
111 // URLRequestContextGetter's creation is moved into StoragePartition. | 114 // URLRequestContextGetter's creation is moved into StoragePartition. |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 // Returns the ::media::BrowserCdm instance associated with |render_frame_id| | 278 // Returns the ::media::BrowserCdm instance associated with |render_frame_id| |
276 // and |cdm_id|, or nullptr if not found. | 279 // and |cdm_id|, or nullptr if not found. |
277 virtual media::BrowserCdm* GetBrowserCdm(int render_frame_id, | 280 virtual media::BrowserCdm* GetBrowserCdm(int render_frame_id, |
278 int cdm_id) const = 0; | 281 int cdm_id) const = 0; |
279 #endif | 282 #endif |
280 | 283 |
281 // Returns the current number of active views in this process. Excludes | 284 // Returns the current number of active views in this process. Excludes |
282 // any RenderViewHosts that are swapped out. | 285 // any RenderViewHosts that are swapped out. |
283 int GetActiveViewCount(); | 286 int GetActiveViewCount(); |
284 | 287 |
| 288 #if defined(OS_MACOSX) |
| 289 // Returns the mach port associated with the process. Use only for testing. |
| 290 virtual mach_port_t GetMachTaskPortForTesting() const = 0; |
| 291 #endif |
| 292 |
285 // Static management functions ----------------------------------------------- | 293 // Static management functions ----------------------------------------------- |
286 | 294 |
287 // Flag to run the renderer in process. This is primarily | 295 // Flag to run the renderer in process. This is primarily |
288 // for debugging purposes. When running "in process", the | 296 // for debugging purposes. When running "in process", the |
289 // browser maintains a single RenderProcessHost which communicates | 297 // browser maintains a single RenderProcessHost which communicates |
290 // to a RenderProcess which is instantiated in the same process | 298 // to a RenderProcess which is instantiated in the same process |
291 // with the Browser. All IPC between the Browser and the | 299 // with the Browser. All IPC between the Browser and the |
292 // Renderer is the same, it's just not crossing a process boundary. | 300 // Renderer is the same, it's just not crossing a process boundary. |
293 | 301 |
294 static bool run_renderer_in_process(); | 302 static bool run_renderer_in_process(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 static void SetMaxRendererProcessCount(size_t count); | 341 static void SetMaxRendererProcessCount(size_t count); |
334 | 342 |
335 // Returns the current maximum number of renderer process hosts kept by the | 343 // Returns the current maximum number of renderer process hosts kept by the |
336 // content module. | 344 // content module. |
337 static size_t GetMaxRendererProcessCount(); | 345 static size_t GetMaxRendererProcessCount(); |
338 }; | 346 }; |
339 | 347 |
340 } // namespace content. | 348 } // namespace content. |
341 | 349 |
342 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 350 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |