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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 base::ProcessHandle GetHandle() const override; | 115 base::ProcessHandle GetHandle() const override; |
116 BrowserContext* GetBrowserContext() const override; | 116 BrowserContext* GetBrowserContext() const override; |
117 bool InSameStoragePartition(StoragePartition* partition) const override; | 117 bool InSameStoragePartition(StoragePartition* partition) const override; |
118 int GetID() const override; | 118 int GetID() const override; |
119 bool HasConnection() const override; | 119 bool HasConnection() const override; |
120 void SetIgnoreInputEvents(bool ignore_input_events) override; | 120 void SetIgnoreInputEvents(bool ignore_input_events) override; |
121 bool IgnoreInputEvents() const override; | 121 bool IgnoreInputEvents() const override; |
122 void Cleanup() override; | 122 void Cleanup() override; |
123 void AddPendingView() override; | 123 void AddPendingView() override; |
124 void RemovePendingView() override; | 124 void RemovePendingView() override; |
| 125 void SetSuddenTerminationAllowed(bool enabled) override; |
125 bool SuddenTerminationAllowed() const override; | 126 bool SuddenTerminationAllowed() const override; |
126 IPC::ChannelProxy* GetChannel() override; | 127 IPC::ChannelProxy* GetChannel() override; |
127 void AddFilter(BrowserMessageFilter* filter) override; | 128 void AddFilter(BrowserMessageFilter* filter) override; |
128 bool FastShutdownForPageCount(size_t count) override; | 129 bool FastShutdownForPageCount(size_t count) override; |
129 bool FastShutdownStarted() const override; | 130 bool FastShutdownStarted() const override; |
130 base::TimeDelta GetChildProcessIdleTime() const override; | 131 base::TimeDelta GetChildProcessIdleTime() const override; |
131 void ResumeRequestsForView(int route_id) override; | 132 void ResumeRequestsForView(int route_id) override; |
132 void FilterURL(bool empty_allowed, GURL* url) override; | 133 void FilterURL(bool empty_allowed, GURL* url) override; |
133 #if defined(ENABLE_WEBRTC) | 134 #if defined(ENABLE_WEBRTC) |
134 void EnableAecDump(const base::FilePath& file) override; | 135 void EnableAecDump(const base::FilePath& file) override; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 311 |
311 // Creates and adds the IO thread message filters. | 312 // Creates and adds the IO thread message filters. |
312 void CreateMessageFilters(); | 313 void CreateMessageFilters(); |
313 | 314 |
314 // Registers Mojo services to be exposed to the renderer. | 315 // Registers Mojo services to be exposed to the renderer. |
315 void RegisterMojoServices(); | 316 void RegisterMojoServices(); |
316 | 317 |
317 // Control message handlers. | 318 // Control message handlers. |
318 void OnShutdownRequest(); | 319 void OnShutdownRequest(); |
319 void OnDumpHandlesDone(); | 320 void OnDumpHandlesDone(); |
320 void OnSuddenTerminationChanged(bool enabled); | 321 void SuddenTerminationChanged(bool enabled); |
321 void OnUserMetricsRecordAction(const std::string& action); | 322 void OnUserMetricsRecordAction(const std::string& action); |
322 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); | 323 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); |
323 void OnCloseACK(int old_route_id); | 324 void OnCloseACK(int old_route_id); |
324 | 325 |
325 // Generates a command line to be used to spawn a renderer and appends the | 326 // Generates a command line to be used to spawn a renderer and appends the |
326 // results to |*command_line|. | 327 // results to |*command_line|. |
327 void AppendRendererCommandLine(base::CommandLine* command_line) const; | 328 void AppendRendererCommandLine(base::CommandLine* command_line) const; |
328 | 329 |
329 // Copies applicable command line switches from the given |browser_cmd| line | 330 // Copies applicable command line switches from the given |browser_cmd| line |
330 // flags to the output |renderer_cmd| line flags. Not all switches will be | 331 // 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... |
411 int id_; | 412 int id_; |
412 | 413 |
413 BrowserContext* browser_context_; | 414 BrowserContext* browser_context_; |
414 | 415 |
415 // Owned by |browser_context_|. | 416 // Owned by |browser_context_|. |
416 StoragePartitionImpl* storage_partition_impl_; | 417 StoragePartitionImpl* storage_partition_impl_; |
417 | 418 |
418 // The observers watching our lifetime. | 419 // The observers watching our lifetime. |
419 ObserverList<RenderProcessHostObserver> observers_; | 420 ObserverList<RenderProcessHostObserver> observers_; |
420 | 421 |
421 // True if the process can be shut down suddenly. If this is true, then it's | 422 // True if the process can be shut down suddenly. If this is true, then we're |
422 // sure that all the RenderFrames in the process can be shutdown suddenly. If | 423 // sure that all the RenderViews in the process can be shutdown suddenly. If |
423 // it's false, then specific RenderFrames might still be allowed to be | 424 // it's false, then specific RenderViews might still be allowed to be shutdown |
424 // shutdown suddenly by checking their SuddenTerminationAllowed() flag. This | 425 // suddenly by checking their SuddenTerminationAllowed() flag. This can occur |
425 // can occur when a RenderFrame has an unload/beforeUnload event listener | 426 // if one WebContents has an unload event listener but another WebContents in |
426 // registered but another RenderFrame in the same process doesn't. | 427 // the same process doesn't. |
427 bool sudden_termination_allowed_; | 428 bool sudden_termination_allowed_; |
428 | 429 |
429 // Set to true if we shouldn't send input events. We actually do the | 430 // Set to true if we shouldn't send input events. We actually do the |
430 // filtering for this at the render widget level. | 431 // filtering for this at the render widget level. |
431 bool ignore_input_events_; | 432 bool ignore_input_events_; |
432 | 433 |
433 // Records the last time we regarded the child process active. | 434 // Records the last time we regarded the child process active. |
434 base::TimeTicks child_process_activity_time_; | 435 base::TimeTicks child_process_activity_time_; |
435 | 436 |
436 // Indicates whether this is a RenderProcessHost of a Browser Plugin guest | 437 // Indicates whether this is a RenderProcessHost of a Browser Plugin guest |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 bool subscribe_uniform_enabled_; | 505 bool subscribe_uniform_enabled_; |
505 | 506 |
506 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 507 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
507 | 508 |
508 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 509 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
509 }; | 510 }; |
510 | 511 |
511 } // namespace content | 512 } // namespace content |
512 | 513 |
513 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 514 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |