| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "content/child/child_shared_bitmap_manager.h" | 58 #include "content/child/child_shared_bitmap_manager.h" |
| 59 #include "content/child/content_child_helpers.h" | 59 #include "content/child/content_child_helpers.h" |
| 60 #include "content/child/db_message_filter.h" | 60 #include "content/child/db_message_filter.h" |
| 61 #include "content/child/indexed_db/indexed_db_dispatcher.h" | 61 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
| 62 #include "content/child/indexed_db/indexed_db_message_filter.h" | 62 #include "content/child/indexed_db/indexed_db_message_filter.h" |
| 63 #include "content/child/resource_dispatcher.h" | 63 #include "content/child/resource_dispatcher.h" |
| 64 #include "content/child/resource_scheduling_filter.h" | 64 #include "content/child/resource_scheduling_filter.h" |
| 65 #include "content/child/runtime_features.h" | 65 #include "content/child/runtime_features.h" |
| 66 #include "content/child/thread_safe_sender.h" | 66 #include "content/child/thread_safe_sender.h" |
| 67 #include "content/child/web_database_observer_impl.h" | 67 #include "content/child/web_database_observer_impl.h" |
| 68 #include "content/child/websocket_message_filter.h" |
| 68 #include "content/child/worker_thread_registry.h" | 69 #include "content/child/worker_thread_registry.h" |
| 69 #include "content/common/child_process_messages.h" | 70 #include "content/common/child_process_messages.h" |
| 70 #include "content/common/content_constants_internal.h" | 71 #include "content/common/content_constants_internal.h" |
| 71 #include "content/common/database_messages.h" | 72 #include "content/common/database_messages.h" |
| 72 #include "content/common/dom_storage/dom_storage_messages.h" | 73 #include "content/common/dom_storage/dom_storage_messages.h" |
| 73 #include "content/common/frame_messages.h" | 74 #include "content/common/frame_messages.h" |
| 74 #include "content/common/gpu/client/context_provider_command_buffer.h" | 75 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 75 #include "content/common/gpu_process_launch_causes.h" | 76 #include "content/common/gpu_process_launch_causes.h" |
| 76 #include "content/common/render_frame_setup.mojom.h" | 77 #include "content/common/render_frame_setup.mojom.h" |
| 77 #include "content/common/render_process_messages.h" | 78 #include "content/common/render_process_messages.h" |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 resource_task_queue2, resource_dispatcher())); | 1178 resource_task_queue2, resource_dispatcher())); |
| 1178 channel()->AddFilter(filter.get()); | 1179 channel()->AddFilter(filter.get()); |
| 1179 resource_dispatcher()->SetResourceSchedulingFilter(filter); | 1180 resource_dispatcher()->SetResourceSchedulingFilter(filter); |
| 1180 | 1181 |
| 1181 // The ChildResourceMessageFilter and the ResourceDispatcher need to use the | 1182 // The ChildResourceMessageFilter and the ResourceDispatcher need to use the |
| 1182 // same queue to ensure tasks are executed in the expected order. | 1183 // same queue to ensure tasks are executed in the expected order. |
| 1183 child_resource_message_filter()->SetMainThreadTaskRunner( | 1184 child_resource_message_filter()->SetMainThreadTaskRunner( |
| 1184 resource_task_queue2); | 1185 resource_task_queue2); |
| 1185 resource_dispatcher()->SetMainThreadTaskRunner(resource_task_queue2); | 1186 resource_dispatcher()->SetMainThreadTaskRunner(resource_task_queue2); |
| 1186 | 1187 |
| 1188 websocket_message_filter()->SetLoadingTaskRunner( |
| 1189 renderer_scheduler_->LoadingTaskRunner()); |
| 1190 |
| 1187 if (!command_line.HasSwitch(switches::kDisableThreadedCompositing) && | 1191 if (!command_line.HasSwitch(switches::kDisableThreadedCompositing) && |
| 1188 !command_line.HasSwitch(switches::kUseRemoteCompositing)) | 1192 !command_line.HasSwitch(switches::kUseRemoteCompositing)) |
| 1189 InitializeCompositorThread(); | 1193 InitializeCompositorThread(); |
| 1190 | 1194 |
| 1191 if (!input_event_filter_.get()) { | 1195 if (!input_event_filter_.get()) { |
| 1192 // Always provide an input event filter implementation to ensure consistent | 1196 // Always provide an input event filter implementation to ensure consistent |
| 1193 // input event scheduling and prioritization. | 1197 // input event scheduling and prioritization. |
| 1194 // TODO(jdduke): Merge InputEventFilter, InputHandlerManager and | 1198 // TODO(jdduke): Merge InputEventFilter, InputHandlerManager and |
| 1195 // MainThreadInputEventFilter, crbug.com/436057. | 1199 // MainThreadInputEventFilter, crbug.com/436057. |
| 1196 input_event_filter_ = new MainThreadInputEventFilter( | 1200 input_event_filter_ = new MainThreadInputEventFilter( |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2089 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) | 2093 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) |
| 2090 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; | 2094 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; |
| 2091 | 2095 |
| 2092 blink::mainThreadIsolate()->MemoryPressureNotification( | 2096 blink::mainThreadIsolate()->MemoryPressureNotification( |
| 2093 v8_memory_pressure_level); | 2097 v8_memory_pressure_level); |
| 2094 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2098 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
| 2095 v8_memory_pressure_level); | 2099 v8_memory_pressure_level); |
| 2096 } | 2100 } |
| 2097 | 2101 |
| 2098 } // namespace content | 2102 } // namespace content |
| OLD | NEW |