| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() | 165 std::unique_ptr<base::SharedPersistentMemoryAllocator> TakeMetricsAllocator() |
| 166 override; | 166 override; |
| 167 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; | 167 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; |
| 168 #if defined(ENABLE_BROWSER_CDMS) | 168 #if defined(ENABLE_BROWSER_CDMS) |
| 169 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, | 169 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, |
| 170 int cdm_id) const override; | 170 int cdm_id) const override; |
| 171 #endif | 171 #endif |
| 172 bool IsProcessBackgrounded() const override; | 172 bool IsProcessBackgrounded() const override; |
| 173 void IncrementWorkerRefCount() override; | 173 void IncrementWorkerRefCount() override; |
| 174 void DecrementWorkerRefCount() override; | 174 void DecrementWorkerRefCount() override; |
| 175 void ForceReleaseWorkerRefCount() override; |
| 175 void PurgeAndSuspend() override; | 176 void PurgeAndSuspend() override; |
| 176 | 177 |
| 177 // IPC::Sender via RenderProcessHost. | 178 // IPC::Sender via RenderProcessHost. |
| 178 bool Send(IPC::Message* msg) override; | 179 bool Send(IPC::Message* msg) override; |
| 179 | 180 |
| 180 // IPC::Listener via RenderProcessHost. | 181 // IPC::Listener via RenderProcessHost. |
| 181 bool OnMessageReceived(const IPC::Message& msg) override; | 182 bool OnMessageReceived(const IPC::Message& msg) override; |
| 182 void OnChannelConnected(int32_t peer_pid) override; | 183 void OnChannelConnected(int32_t peer_pid) override; |
| 183 void OnChannelError() override; | 184 void OnChannelError() override; |
| 184 void OnBadMessageReceived(const IPC::Message& message) override; | 185 void OnBadMessageReceived(const IPC::Message& message) override; |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 | 505 |
| 505 int worker_ref_count_; | 506 int worker_ref_count_; |
| 506 | 507 |
| 507 // Records the time when the process starts surviving for workers for UMA. | 508 // Records the time when the process starts surviving for workers for UMA. |
| 508 base::TimeTicks survive_for_worker_start_time_; | 509 base::TimeTicks survive_for_worker_start_time_; |
| 509 | 510 |
| 510 // Records the maximum # of workers simultaneously hosted in this process | 511 // Records the maximum # of workers simultaneously hosted in this process |
| 511 // for UMA. | 512 // for UMA. |
| 512 int max_worker_count_; | 513 int max_worker_count_; |
| 513 | 514 |
| 515 // Set in ForceReleaseWorkerRefCount to ensure that IncrementWorkerRefCount |
| 516 // and DecrementWorkerRefCount will not be called. |
| 517 bool worker_ref_count_disabled_; |
| 518 |
| 514 // Context shared for each mojom::PermissionService instance created for this | 519 // Context shared for each mojom::PermissionService instance created for this |
| 515 // RPH. | 520 // RPH. |
| 516 std::unique_ptr<PermissionServiceContext> permission_service_context_; | 521 std::unique_ptr<PermissionServiceContext> permission_service_context_; |
| 517 | 522 |
| 518 // The memory allocator, if any, in which the renderer will write its metrics. | 523 // The memory allocator, if any, in which the renderer will write its metrics. |
| 519 std::unique_ptr<base::SharedPersistentMemoryAllocator> metrics_allocator_; | 524 std::unique_ptr<base::SharedPersistentMemoryAllocator> metrics_allocator_; |
| 520 | 525 |
| 521 bool channel_connected_; | 526 bool channel_connected_; |
| 522 bool sent_render_process_ready_; | 527 bool sent_render_process_ready_; |
| 523 | 528 |
| 524 #if defined(OS_ANDROID) | 529 #if defined(OS_ANDROID) |
| 525 // UI thread is the source of sync IPCs and all shutdown signals. | 530 // UI thread is the source of sync IPCs and all shutdown signals. |
| 526 // Therefore a proper shutdown event to unblock the UI thread is not | 531 // Therefore a proper shutdown event to unblock the UI thread is not |
| 527 // possible without massive refactoring shutdown code. | 532 // possible without massive refactoring shutdown code. |
| 528 // Luckily Android never performs a clean shutdown. So explicitly | 533 // Luckily Android never performs a clean shutdown. So explicitly |
| 529 // ignore this problem. | 534 // ignore this problem. |
| 530 base::WaitableEvent never_signaled_; | 535 base::WaitableEvent never_signaled_; |
| 531 #endif | 536 #endif |
| 532 | 537 |
| 533 scoped_refptr<ResourceMessageFilter> resource_message_filter_; | 538 scoped_refptr<ResourceMessageFilter> resource_message_filter_; |
| 534 | 539 |
| 535 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 540 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 536 | 541 |
| 537 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 542 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 538 }; | 543 }; |
| 539 | 544 |
| 540 } // namespace content | 545 } // namespace content |
| 541 | 546 |
| 542 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 547 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |