Chromium Code Reviews| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 base::ProcessHandle GetHandle() const override; | 114 base::ProcessHandle GetHandle() const override; |
| 115 BrowserContext* GetBrowserContext() const override; | 115 BrowserContext* GetBrowserContext() const override; |
| 116 bool InSameStoragePartition(StoragePartition* partition) const override; | 116 bool InSameStoragePartition(StoragePartition* partition) const override; |
| 117 int GetID() const override; | 117 int GetID() const override; |
| 118 bool HasConnection() const override; | 118 bool HasConnection() const override; |
| 119 void SetIgnoreInputEvents(bool ignore_input_events) override; | 119 void SetIgnoreInputEvents(bool ignore_input_events) override; |
| 120 bool IgnoreInputEvents() const override; | 120 bool IgnoreInputEvents() const override; |
| 121 void Cleanup() override; | 121 void Cleanup() override; |
| 122 void AddPendingView() override; | 122 void AddPendingView() override; |
| 123 void RemovePendingView() override; | 123 void RemovePendingView() override; |
| 124 void SetSuddenTerminationAllowed(bool enabled) override; | |
| 125 bool SuddenTerminationAllowed() const override; | 124 bool SuddenTerminationAllowed() const override; |
| 126 IPC::ChannelProxy* GetChannel() override; | 125 IPC::ChannelProxy* GetChannel() override; |
| 127 void AddFilter(BrowserMessageFilter* filter) override; | 126 void AddFilter(BrowserMessageFilter* filter) override; |
| 128 bool FastShutdownForPageCount(size_t count) override; | 127 bool FastShutdownForPageCount(size_t count) override; |
| 129 bool FastShutdownStarted() const override; | 128 bool FastShutdownStarted() const override; |
| 130 base::TimeDelta GetChildProcessIdleTime() const override; | 129 base::TimeDelta GetChildProcessIdleTime() const override; |
| 131 void ResumeRequestsForView(int route_id) override; | 130 void ResumeRequestsForView(int route_id) override; |
| 132 void FilterURL(bool empty_allowed, GURL* url) override; | 131 void FilterURL(bool empty_allowed, GURL* url) override; |
| 133 #if defined(ENABLE_WEBRTC) | 132 #if defined(ENABLE_WEBRTC) |
| 134 void EnableAecDump(const base::FilePath& file) override; | 133 void EnableAecDump(const base::FilePath& file) override; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 | 303 |
| 305 // Creates and adds the IO thread message filters. | 304 // Creates and adds the IO thread message filters. |
| 306 void CreateMessageFilters(); | 305 void CreateMessageFilters(); |
| 307 | 306 |
| 308 // Registers Mojo services to be exposed to the renderer. | 307 // Registers Mojo services to be exposed to the renderer. |
| 309 void RegisterMojoServices(); | 308 void RegisterMojoServices(); |
| 310 | 309 |
| 311 // Control message handlers. | 310 // Control message handlers. |
| 312 void OnShutdownRequest(); | 311 void OnShutdownRequest(); |
| 313 void OnDumpHandlesDone(); | 312 void OnDumpHandlesDone(); |
| 314 void SuddenTerminationChanged(bool enabled); | 313 void OnSuddenTerminationChanged(bool enabled); |
| 315 void OnUserMetricsRecordAction(const std::string& action); | 314 void OnUserMetricsRecordAction(const std::string& action); |
| 316 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); | 315 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); |
| 317 void OnCloseACK(int old_route_id); | 316 void OnCloseACK(int old_route_id); |
| 318 | 317 |
| 319 // Generates a command line to be used to spawn a renderer and appends the | 318 // Generates a command line to be used to spawn a renderer and appends the |
| 320 // results to |*command_line|. | 319 // results to |*command_line|. |
| 321 void AppendRendererCommandLine(base::CommandLine* command_line) const; | 320 void AppendRendererCommandLine(base::CommandLine* command_line) const; |
| 322 | 321 |
| 323 // Copies applicable command line switches from the given |browser_cmd| line | 322 // Copies applicable command line switches from the given |browser_cmd| line |
| 324 // flags to the output |renderer_cmd| line flags. Not all switches will be | 323 // flags to the output |renderer_cmd| line flags. Not all switches will be |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 405 int id_; | 404 int id_; |
| 406 | 405 |
| 407 BrowserContext* browser_context_; | 406 BrowserContext* browser_context_; |
| 408 | 407 |
| 409 // Owned by |browser_context_|. | 408 // Owned by |browser_context_|. |
| 410 StoragePartitionImpl* storage_partition_impl_; | 409 StoragePartitionImpl* storage_partition_impl_; |
| 411 | 410 |
| 412 // The observers watching our lifetime. | 411 // The observers watching our lifetime. |
| 413 ObserverList<RenderProcessHostObserver> observers_; | 412 ObserverList<RenderProcessHostObserver> observers_; |
| 414 | 413 |
| 415 // True if the process can be shut down suddenly. If this is true, then we're | 414 // Whether the sudden termination of the process was enabled on a process |
|
Charlie Reis
2015/01/29 23:20:41
was enabled on -> is allowed at
clamy
2015/02/02 16:16:27
Done.
| |
| 416 // sure that all the RenderViews in the process can be shutdown suddenly. If | 415 // level. This is independant from the status of the various RenderFrames in |
|
Charlie Reis
2015/01/29 23:20:41
independent
clamy
2015/02/02 16:16:27
Done.
| |
| 417 // it's false, then specific RenderViews might still be allowed to be shutdown | 416 // the process: even if this is false, some RenderFrames may be shutdown |
| 418 // suddenly by checking their SuddenTerminationAllowed() flag. This can occur | 417 // suddenly if their SuddenTerminationAllowed() flag is true. Similarly, if it |
| 419 // if one WebContents has an unload event listener but another WebContents in | 418 // is true, but some of the RenderFrames cannot be shutdown suddenly, then the |
| 420 // the same process doesn't. | 419 // process cannot be suddenly terminated. |
|
Charlie Reis
2015/01/29 23:20:41
I don't think this comment is accurate, if I'm fol
clamy
2015/02/02 16:16:27
My plan was to get rid of the calls to RendererBli
| |
| 421 bool sudden_termination_allowed_; | 420 bool sudden_termination_enabled_; |
|
Charlie Reis
2015/01/29 23:20:41
Let's stick with allowed rather than enabled, sinc
clamy
2015/02/02 16:16:27
Done.
| |
| 422 | 421 |
| 423 // Set to true if we shouldn't send input events. We actually do the | 422 // Set to true if we shouldn't send input events. We actually do the |
| 424 // filtering for this at the render widget level. | 423 // filtering for this at the render widget level. |
| 425 bool ignore_input_events_; | 424 bool ignore_input_events_; |
| 426 | 425 |
| 427 // Records the last time we regarded the child process active. | 426 // Records the last time we regarded the child process active. |
| 428 base::TimeTicks child_process_activity_time_; | 427 base::TimeTicks child_process_activity_time_; |
| 429 | 428 |
| 430 // Indicates whether this is a RenderProcessHost of a Browser Plugin guest | 429 // Indicates whether this is a RenderProcessHost of a Browser Plugin guest |
| 431 // renderer. | 430 // renderer. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 494 bool subscribe_uniform_enabled_; | 493 bool subscribe_uniform_enabled_; |
| 495 | 494 |
| 496 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 495 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 497 | 496 |
| 498 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 497 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 499 }; | 498 }; |
| 500 | 499 |
| 501 } // namespace content | 500 } // namespace content |
| 502 | 501 |
| 503 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 502 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |