| 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 #include "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 GetInterfaceRegistry()->AddInterface(base::Bind(CreateEmbeddedWorkerSetup)); | 851 GetInterfaceRegistry()->AddInterface(base::Bind(CreateEmbeddedWorkerSetup)); |
| 852 | 852 |
| 853 GetRemoteInterfaces()->GetInterface( | 853 GetRemoteInterfaces()->GetInterface( |
| 854 mojo::GetProxy(&storage_partition_service_)); | 854 mojo::GetProxy(&storage_partition_service_)); |
| 855 | 855 |
| 856 device::mojom::TimeZoneMonitorPtr time_zone_monitor; | 856 device::mojom::TimeZoneMonitorPtr time_zone_monitor; |
| 857 GetRemoteInterfaces()->GetInterface(mojo::GetProxy(&time_zone_monitor)); | 857 GetRemoteInterfaces()->GetInterface(mojo::GetProxy(&time_zone_monitor)); |
| 858 time_zone_monitor->AddClient( | 858 time_zone_monitor->AddClient( |
| 859 time_zone_monitor_binding_.CreateInterfacePtrAndBind()); | 859 time_zone_monitor_binding_.CreateInterfacePtrAndBind()); |
| 860 | 860 |
| 861 ChildProcess::current()->SetIOThreadPriority(base::ThreadPriority::DISPLAY); |
| 862 ChildThreadImpl::current()->SetThreadPriority( |
| 863 categorized_worker_pool_->background_worker_thread_id(), |
| 864 base::ThreadPriority::BACKGROUND); |
| 865 |
| 861 is_renderer_suspended_ = false; | 866 is_renderer_suspended_ = false; |
| 862 } | 867 } |
| 863 | 868 |
| 864 RenderThreadImpl::~RenderThreadImpl() { | 869 RenderThreadImpl::~RenderThreadImpl() { |
| 865 } | 870 } |
| 866 | 871 |
| 867 void RenderThreadImpl::Shutdown() { | 872 void RenderThreadImpl::Shutdown() { |
| 868 FOR_EACH_OBSERVER( | 873 FOR_EACH_OBSERVER( |
| 869 RenderThreadObserver, observers_, OnRenderProcessShutdown()); | 874 RenderThreadObserver, observers_, OnRenderProcessShutdown()); |
| 870 | 875 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 base::Thread::Options options; | 1132 base::Thread::Options options; |
| 1128 #if defined(OS_ANDROID) | 1133 #if defined(OS_ANDROID) |
| 1129 options.priority = base::ThreadPriority::DISPLAY; | 1134 options.priority = base::ThreadPriority::DISPLAY; |
| 1130 #endif | 1135 #endif |
| 1131 compositor_thread_.reset(new WebThreadForCompositor(options)); | 1136 compositor_thread_.reset(new WebThreadForCompositor(options)); |
| 1132 blink_platform_impl_->SetCompositorThread(compositor_thread_.get()); | 1137 blink_platform_impl_->SetCompositorThread(compositor_thread_.get()); |
| 1133 compositor_task_runner_ = compositor_thread_->GetTaskRunner(); | 1138 compositor_task_runner_ = compositor_thread_->GetTaskRunner(); |
| 1134 compositor_task_runner_->PostTask( | 1139 compositor_task_runner_->PostTask( |
| 1135 FROM_HERE, | 1140 FROM_HERE, |
| 1136 base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed), false)); | 1141 base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed), false)); |
| 1142 ChildThreadImpl::current()->SetThreadPriority(compositor_thread_->threadId(), |
| 1143 base::ThreadPriority::DISPLAY); |
| 1137 | 1144 |
| 1138 SynchronousInputHandlerProxyClient* synchronous_input_handler_proxy_client = | 1145 SynchronousInputHandlerProxyClient* synchronous_input_handler_proxy_client = |
| 1139 nullptr; | 1146 nullptr; |
| 1140 #if defined(OS_ANDROID) | 1147 #if defined(OS_ANDROID) |
| 1141 if (GetContentClient()->UsingSynchronousCompositing()) { | 1148 if (GetContentClient()->UsingSynchronousCompositing()) { |
| 1142 sync_compositor_message_filter_ = | 1149 sync_compositor_message_filter_ = |
| 1143 new SynchronousCompositorFilter(compositor_task_runner_); | 1150 new SynchronousCompositorFilter(compositor_task_runner_); |
| 1144 AddFilter(sync_compositor_message_filter_.get()); | 1151 AddFilter(sync_compositor_message_filter_.get()); |
| 1145 synchronous_input_handler_proxy_client = | 1152 synchronous_input_handler_proxy_client = |
| 1146 sync_compositor_message_filter_.get(); | 1153 sync_compositor_message_filter_.get(); |
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2274 if (blink::mainThreadIsolate()) { | 2281 if (blink::mainThreadIsolate()) { |
| 2275 blink::mainThreadIsolate()->MemoryPressureNotification( | 2282 blink::mainThreadIsolate()->MemoryPressureNotification( |
| 2276 v8::MemoryPressureLevel::kCritical); | 2283 v8::MemoryPressureLevel::kCritical); |
| 2277 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2284 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
| 2278 v8::MemoryPressureLevel::kCritical); | 2285 v8::MemoryPressureLevel::kCritical); |
| 2279 } | 2286 } |
| 2280 } | 2287 } |
| 2281 | 2288 |
| 2282 | 2289 |
| 2283 } // namespace content | 2290 } // namespace content |
| OLD | NEW |