| 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_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 : public RenderProcessHost, | 83 : public RenderProcessHost, |
| 84 public ChildProcessLauncher::Client, | 84 public ChildProcessLauncher::Client, |
| 85 public GpuDataManagerObserver { | 85 public GpuDataManagerObserver { |
| 86 public: | 86 public: |
| 87 RenderProcessHostImpl(BrowserContext* browser_context, | 87 RenderProcessHostImpl(BrowserContext* browser_context, |
| 88 StoragePartitionImpl* storage_partition_impl, | 88 StoragePartitionImpl* storage_partition_impl, |
| 89 bool is_isolated_guest); | 89 bool is_isolated_guest); |
| 90 virtual ~RenderProcessHostImpl(); | 90 virtual ~RenderProcessHostImpl(); |
| 91 | 91 |
| 92 // RenderProcessHost implementation (public portion). | 92 // RenderProcessHost implementation (public portion). |
| 93 virtual void EnableSendQueue() OVERRIDE; | 93 virtual void EnableSendQueue() override; |
| 94 virtual bool Init() OVERRIDE; | 94 virtual bool Init() override; |
| 95 virtual int GetNextRoutingID() OVERRIDE; | 95 virtual int GetNextRoutingID() override; |
| 96 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; | 96 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) override; |
| 97 virtual void RemoveRoute(int32 routing_id) OVERRIDE; | 97 virtual void RemoveRoute(int32 routing_id) override; |
| 98 virtual void AddObserver(RenderProcessHostObserver* observer) OVERRIDE; | 98 virtual void AddObserver(RenderProcessHostObserver* observer) override; |
| 99 virtual void RemoveObserver(RenderProcessHostObserver* observer) OVERRIDE; | 99 virtual void RemoveObserver(RenderProcessHostObserver* observer) override; |
| 100 virtual void ReceivedBadMessage() OVERRIDE; | 100 virtual void ReceivedBadMessage() override; |
| 101 virtual void WidgetRestored() OVERRIDE; | 101 virtual void WidgetRestored() override; |
| 102 virtual void WidgetHidden() OVERRIDE; | 102 virtual void WidgetHidden() override; |
| 103 virtual int VisibleWidgetCount() const OVERRIDE; | 103 virtual int VisibleWidgetCount() const override; |
| 104 virtual bool IsIsolatedGuest() const OVERRIDE; | 104 virtual bool IsIsolatedGuest() const override; |
| 105 virtual StoragePartition* GetStoragePartition() const OVERRIDE; | 105 virtual StoragePartition* GetStoragePartition() const override; |
| 106 virtual bool FastShutdownIfPossible() OVERRIDE; | 106 virtual bool FastShutdownIfPossible() override; |
| 107 virtual void DumpHandles() OVERRIDE; | 107 virtual void DumpHandles() override; |
| 108 virtual base::ProcessHandle GetHandle() const OVERRIDE; | 108 virtual base::ProcessHandle GetHandle() const override; |
| 109 virtual BrowserContext* GetBrowserContext() const OVERRIDE; | 109 virtual BrowserContext* GetBrowserContext() const override; |
| 110 virtual bool InSameStoragePartition( | 110 virtual bool InSameStoragePartition( |
| 111 StoragePartition* partition) const OVERRIDE; | 111 StoragePartition* partition) const override; |
| 112 virtual int GetID() const OVERRIDE; | 112 virtual int GetID() const override; |
| 113 virtual bool HasConnection() const OVERRIDE; | 113 virtual bool HasConnection() const override; |
| 114 virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE; | 114 virtual void SetIgnoreInputEvents(bool ignore_input_events) override; |
| 115 virtual bool IgnoreInputEvents() const OVERRIDE; | 115 virtual bool IgnoreInputEvents() const override; |
| 116 virtual void Cleanup() OVERRIDE; | 116 virtual void Cleanup() override; |
| 117 virtual void AddPendingView() OVERRIDE; | 117 virtual void AddPendingView() override; |
| 118 virtual void RemovePendingView() OVERRIDE; | 118 virtual void RemovePendingView() override; |
| 119 virtual void SetSuddenTerminationAllowed(bool enabled) OVERRIDE; | 119 virtual void SetSuddenTerminationAllowed(bool enabled) override; |
| 120 virtual bool SuddenTerminationAllowed() const OVERRIDE; | 120 virtual bool SuddenTerminationAllowed() const override; |
| 121 virtual IPC::ChannelProxy* GetChannel() OVERRIDE; | 121 virtual IPC::ChannelProxy* GetChannel() override; |
| 122 virtual void AddFilter(BrowserMessageFilter* filter) OVERRIDE; | 122 virtual void AddFilter(BrowserMessageFilter* filter) override; |
| 123 virtual bool FastShutdownForPageCount(size_t count) OVERRIDE; | 123 virtual bool FastShutdownForPageCount(size_t count) override; |
| 124 virtual bool FastShutdownStarted() const OVERRIDE; | 124 virtual bool FastShutdownStarted() const override; |
| 125 virtual base::TimeDelta GetChildProcessIdleTime() const OVERRIDE; | 125 virtual base::TimeDelta GetChildProcessIdleTime() const override; |
| 126 virtual void ResumeRequestsForView(int route_id) OVERRIDE; | 126 virtual void ResumeRequestsForView(int route_id) override; |
| 127 virtual void FilterURL(bool empty_allowed, GURL* url) OVERRIDE; | 127 virtual void FilterURL(bool empty_allowed, GURL* url) override; |
| 128 #if defined(ENABLE_WEBRTC) | 128 #if defined(ENABLE_WEBRTC) |
| 129 virtual void EnableAecDump(const base::FilePath& file) OVERRIDE; | 129 virtual void EnableAecDump(const base::FilePath& file) override; |
| 130 virtual void DisableAecDump() OVERRIDE; | 130 virtual void DisableAecDump() override; |
| 131 virtual void SetWebRtcLogMessageCallback( | 131 virtual void SetWebRtcLogMessageCallback( |
| 132 base::Callback<void(const std::string&)> callback) OVERRIDE; | 132 base::Callback<void(const std::string&)> callback) override; |
| 133 virtual WebRtcStopRtpDumpCallback StartRtpDump( | 133 virtual WebRtcStopRtpDumpCallback StartRtpDump( |
| 134 bool incoming, | 134 bool incoming, |
| 135 bool outgoing, | 135 bool outgoing, |
| 136 const WebRtcRtpPacketCallback& packet_callback) OVERRIDE; | 136 const WebRtcRtpPacketCallback& packet_callback) override; |
| 137 #endif | 137 #endif |
| 138 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) | 138 virtual void ResumeDeferredNavigation(const GlobalRequestID& request_id) |
| 139 OVERRIDE; | 139 override; |
| 140 virtual void NotifyTimezoneChange() OVERRIDE; | 140 virtual void NotifyTimezoneChange() override; |
| 141 virtual ServiceRegistry* GetServiceRegistry() OVERRIDE; | 141 virtual ServiceRegistry* GetServiceRegistry() override; |
| 142 | 142 |
| 143 // IPC::Sender via RenderProcessHost. | 143 // IPC::Sender via RenderProcessHost. |
| 144 virtual bool Send(IPC::Message* msg) OVERRIDE; | 144 virtual bool Send(IPC::Message* msg) override; |
| 145 | 145 |
| 146 // IPC::Listener via RenderProcessHost. | 146 // IPC::Listener via RenderProcessHost. |
| 147 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 147 virtual bool OnMessageReceived(const IPC::Message& msg) override; |
| 148 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 148 virtual void OnChannelConnected(int32 peer_pid) override; |
| 149 virtual void OnChannelError() OVERRIDE; | 149 virtual void OnChannelError() override; |
| 150 virtual void OnBadMessageReceived(const IPC::Message& message) OVERRIDE; | 150 virtual void OnBadMessageReceived(const IPC::Message& message) override; |
| 151 | 151 |
| 152 // ChildProcessLauncher::Client implementation. | 152 // ChildProcessLauncher::Client implementation. |
| 153 virtual void OnProcessLaunched() OVERRIDE; | 153 virtual void OnProcessLaunched() override; |
| 154 | 154 |
| 155 scoped_refptr<AudioRendererHost> audio_renderer_host() const; | 155 scoped_refptr<AudioRendererHost> audio_renderer_host() const; |
| 156 | 156 |
| 157 // Call this function when it is evident that the child process is actively | 157 // Call this function when it is evident that the child process is actively |
| 158 // performing some operation, for example if we just received an IPC message. | 158 // performing some operation, for example if we just received an IPC message. |
| 159 void mark_child_process_activity_time() { | 159 void mark_child_process_activity_time() { |
| 160 child_process_activity_time_ = base::TimeTicks::Now(); | 160 child_process_activity_time_ = base::TimeTicks::Now(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 // Returns the current number of active views in this process. Excludes | 163 // Returns the current number of active views in this process. Excludes |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 void PropagateBrowserCommandLineToRenderer( | 313 void PropagateBrowserCommandLineToRenderer( |
| 314 const base::CommandLine& browser_cmd, | 314 const base::CommandLine& browser_cmd, |
| 315 base::CommandLine* renderer_cmd) const; | 315 base::CommandLine* renderer_cmd) const; |
| 316 | 316 |
| 317 // Callers can reduce the RenderProcess' priority. | 317 // Callers can reduce the RenderProcess' priority. |
| 318 void SetBackgrounded(bool backgrounded); | 318 void SetBackgrounded(bool backgrounded); |
| 319 | 319 |
| 320 // Handle termination of our process. | 320 // Handle termination of our process. |
| 321 void ProcessDied(bool already_dead); | 321 void ProcessDied(bool already_dead); |
| 322 | 322 |
| 323 virtual void OnGpuSwitching() OVERRIDE; | 323 virtual void OnGpuSwitching() override; |
| 324 | 324 |
| 325 #if defined(ENABLE_WEBRTC) | 325 #if defined(ENABLE_WEBRTC) |
| 326 void OnRegisterAecDumpConsumer(int id); | 326 void OnRegisterAecDumpConsumer(int id); |
| 327 void OnUnregisterAecDumpConsumer(int id); | 327 void OnUnregisterAecDumpConsumer(int id); |
| 328 void RegisterAecDumpConsumerOnUIThread(int id); | 328 void RegisterAecDumpConsumerOnUIThread(int id); |
| 329 void UnregisterAecDumpConsumerOnUIThread(int id); | 329 void UnregisterAecDumpConsumerOnUIThread(int id); |
| 330 void EnableAecDumpForId(const base::FilePath& file, int id); | 330 void EnableAecDumpForId(const base::FilePath& file, int id); |
| 331 // Sends |file_for_transit| to the render process. | 331 // Sends |file_for_transit| to the render process. |
| 332 void SendAecDumpFileToRenderer(int id, | 332 void SendAecDumpFileToRenderer(int id, |
| 333 IPC::PlatformFileForTransit file_for_transit); | 333 IPC::PlatformFileForTransit file_for_transit); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 base::TimeTicks survive_for_worker_start_time_; | 456 base::TimeTicks survive_for_worker_start_time_; |
| 457 | 457 |
| 458 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 458 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 459 | 459 |
| 460 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 460 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 461 }; | 461 }; |
| 462 | 462 |
| 463 } // namespace content | 463 } // namespace content |
| 464 | 464 |
| 465 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 465 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |