| 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_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 bool Send(IPC::Message* msg) override; | 154 bool Send(IPC::Message* msg) override; |
| 155 | 155 |
| 156 // IPC::Listener via RenderProcessHost. | 156 // IPC::Listener via RenderProcessHost. |
| 157 bool OnMessageReceived(const IPC::Message& msg) override; | 157 bool OnMessageReceived(const IPC::Message& msg) override; |
| 158 void OnChannelConnected(int32 peer_pid) override; | 158 void OnChannelConnected(int32 peer_pid) override; |
| 159 void OnChannelError() override; | 159 void OnChannelError() override; |
| 160 void OnBadMessageReceived(const IPC::Message& message) override; | 160 void OnBadMessageReceived(const IPC::Message& message) override; |
| 161 | 161 |
| 162 // ChildProcessLauncher::Client implementation. | 162 // ChildProcessLauncher::Client implementation. |
| 163 void OnProcessLaunched() override; | 163 void OnProcessLaunched() override; |
| 164 void OnProcessLaunchFailed() override; |
| 164 | 165 |
| 165 scoped_refptr<AudioRendererHost> audio_renderer_host() const; | 166 scoped_refptr<AudioRendererHost> audio_renderer_host() const; |
| 166 | 167 |
| 167 // Call this function when it is evident that the child process is actively | 168 // Call this function when it is evident that the child process is actively |
| 168 // performing some operation, for example if we just received an IPC message. | 169 // performing some operation, for example if we just received an IPC message. |
| 169 void mark_child_process_activity_time() { | 170 void mark_child_process_activity_time() { |
| 170 child_process_activity_time_ = base::TimeTicks::Now(); | 171 child_process_activity_time_ = base::TimeTicks::Now(); |
| 171 } | 172 } |
| 172 | 173 |
| 173 // Returns the current number of active views in this process. Excludes | 174 // Returns the current number of active views in this process. Excludes |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // flags to the output |renderer_cmd| line flags. Not all switches will be | 325 // flags to the output |renderer_cmd| line flags. Not all switches will be |
| 325 // copied over. | 326 // copied over. |
| 326 void PropagateBrowserCommandLineToRenderer( | 327 void PropagateBrowserCommandLineToRenderer( |
| 327 const base::CommandLine& browser_cmd, | 328 const base::CommandLine& browser_cmd, |
| 328 base::CommandLine* renderer_cmd) const; | 329 base::CommandLine* renderer_cmd) const; |
| 329 | 330 |
| 330 // Callers can reduce the RenderProcess' priority. | 331 // Callers can reduce the RenderProcess' priority. |
| 331 void SetBackgrounded(bool backgrounded); | 332 void SetBackgrounded(bool backgrounded); |
| 332 | 333 |
| 333 // Handle termination of our process. | 334 // Handle termination of our process. |
| 334 void ProcessDied(bool already_dead); | 335 void ProcessDied(bool already_dead, RendererClosedDetails* known_details); |
| 335 | 336 |
| 336 // GpuSwitchingObserver implementation. | 337 // GpuSwitchingObserver implementation. |
| 337 void OnGpuSwitched() override; | 338 void OnGpuSwitched() override; |
| 338 | 339 |
| 339 #if defined(ENABLE_WEBRTC) | 340 #if defined(ENABLE_WEBRTC) |
| 340 void OnRegisterAecDumpConsumer(int id); | 341 void OnRegisterAecDumpConsumer(int id); |
| 341 void OnUnregisterAecDumpConsumer(int id); | 342 void OnUnregisterAecDumpConsumer(int id); |
| 342 void RegisterAecDumpConsumerOnUIThread(int id); | 343 void RegisterAecDumpConsumerOnUIThread(int id); |
| 343 void UnregisterAecDumpConsumerOnUIThread(int id); | 344 void UnregisterAecDumpConsumerOnUIThread(int id); |
| 344 void EnableAecDumpForId(const base::FilePath& file, int id); | 345 void EnableAecDumpForId(const base::FilePath& file, int id); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 bool subscribe_uniform_enabled_; | 495 bool subscribe_uniform_enabled_; |
| 495 | 496 |
| 496 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 497 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 497 | 498 |
| 498 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 499 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 499 }; | 500 }; |
| 500 | 501 |
| 501 } // namespace content | 502 } // namespace content |
| 502 | 503 |
| 503 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 504 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |