Chromium Code Reviews| Index: content/browser/renderer_host/render_process_host_impl.h |
| diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h |
| index e6c2f8252948449b90a0b1f7d43e5a91eae238f9..72bec378281732a6f7d8fb22bc7cab5de59260cd 100644 |
| --- a/content/browser/renderer_host/render_process_host_impl.h |
| +++ b/content/browser/renderer_host/render_process_host_impl.h |
| @@ -28,6 +28,10 @@ |
| #include "content/common/mac/io_surface_manager_token.h" |
| #endif |
| +#if defined(OS_MACOSX) |
| +#include "content/browser/mach_broker_mac.h" |
| +#endif |
| + |
| namespace base { |
| class CommandLine; |
| class MessageLoop; |
| @@ -112,6 +116,7 @@ class CONTENT_EXPORT RenderProcessHostImpl |
| void WidgetRestored() override; |
| void WidgetHidden() override; |
| int VisibleWidgetCount() const override; |
| + void AudioStateChanged() override; |
| bool IsForGuestsOnly() const override; |
| StoragePartition* GetStoragePartition() const override; |
| bool Shutdown(int exit_code, bool wait) override; |
| @@ -158,6 +163,9 @@ class CONTENT_EXPORT RenderProcessHostImpl |
| media::BrowserCdm* GetBrowserCdm(int render_frame_id, |
| int cdm_id) const override; |
| #endif |
| +#if defined(OS_MACOSX) |
| + mach_port_t GetMachTaskPortForTesting() const override; |
|
gab
2015/08/24 20:59:22
Only need #include <mach/mach.h> for |mach_port_t|
Robert Sesek
2015/08/24 21:44:48
Correct. And there's already an #if for OS_MACOSX
sebsg
2015/08/25 01:35:59
In fact, I don't think I need to include mach/mach
sebsg
2015/08/25 01:35:59
Acknowledged.
|
| +#endif |
| // IPC::Sender via RenderProcessHost. |
| bool Send(IPC::Message* msg) override; |
| @@ -323,8 +331,10 @@ class CONTENT_EXPORT RenderProcessHostImpl |
| const base::CommandLine& browser_cmd, |
| base::CommandLine* renderer_cmd) const; |
| - // Callers can reduce the RenderProcess' priority. |
| - void SetBackgrounded(bool backgrounded); |
| + // Inspects the current object state and sets/removes background priority if |
| + // appropriate. Should be called after any of the involved data members |
| + // change. |
| + void UpdateProcessPriority(); |
| // Handle termination of our process. |
| void ProcessDied(bool already_dead, RendererClosedDetails* known_details); |
| @@ -355,8 +365,9 @@ class CONTENT_EXPORT RenderProcessHostImpl |
| // backgrounded. |
| int32 visible_widgets_; |
| - // Does this process have backgrounded priority. |
| - bool backgrounded_; |
| + // Whether this process currently has backgrounded priority. Tracked so that |
| + // UpdateProcessPriority() can avoid redundantly setting the priority. |
| + bool is_process_backgrounded_; |
| // Used to allow a RenderWidgetHost to intercept various messages on the |
| // IO thread. |