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" | |
69 #include "content/child/worker_thread_registry.h" | 68 #include "content/child/worker_thread_registry.h" |
70 #include "content/common/child_process_messages.h" | 69 #include "content/common/child_process_messages.h" |
71 #include "content/common/content_constants_internal.h" | 70 #include "content/common/content_constants_internal.h" |
72 #include "content/common/database_messages.h" | 71 #include "content/common/database_messages.h" |
73 #include "content/common/dom_storage/dom_storage_messages.h" | 72 #include "content/common/dom_storage/dom_storage_messages.h" |
74 #include "content/common/frame_messages.h" | 73 #include "content/common/frame_messages.h" |
75 #include "content/common/gpu/client/context_provider_command_buffer.h" | 74 #include "content/common/gpu/client/context_provider_command_buffer.h" |
76 #include "content/common/gpu_process_launch_causes.h" | 75 #include "content/common/gpu_process_launch_causes.h" |
77 #include "content/common/render_process_messages.h" | 76 #include "content/common/render_process_messages.h" |
78 #include "content/common/resource_messages.h" | 77 #include "content/common/resource_messages.h" |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 resource_task_queue2, resource_dispatcher())); | 1175 resource_task_queue2, resource_dispatcher())); |
1177 channel()->AddFilter(filter.get()); | 1176 channel()->AddFilter(filter.get()); |
1178 resource_dispatcher()->SetResourceSchedulingFilter(filter); | 1177 resource_dispatcher()->SetResourceSchedulingFilter(filter); |
1179 | 1178 |
1180 // The ChildResourceMessageFilter and the ResourceDispatcher need to use the | 1179 // The ChildResourceMessageFilter and the ResourceDispatcher need to use the |
1181 // same queue to ensure tasks are executed in the expected order. | 1180 // same queue to ensure tasks are executed in the expected order. |
1182 child_resource_message_filter()->SetMainThreadTaskRunner( | 1181 child_resource_message_filter()->SetMainThreadTaskRunner( |
1183 resource_task_queue2); | 1182 resource_task_queue2); |
1184 resource_dispatcher()->SetMainThreadTaskRunner(resource_task_queue2); | 1183 resource_dispatcher()->SetMainThreadTaskRunner(resource_task_queue2); |
1185 | 1184 |
1186 websocket_message_filter()->SetLoadingTaskRunner( | |
1187 renderer_scheduler_->LoadingTaskRunner()); | |
1188 | |
1189 if (!command_line.HasSwitch(switches::kDisableThreadedCompositing) && | 1185 if (!command_line.HasSwitch(switches::kDisableThreadedCompositing) && |
1190 !command_line.HasSwitch(switches::kUseRemoteCompositing)) | 1186 !command_line.HasSwitch(switches::kUseRemoteCompositing)) |
1191 InitializeCompositorThread(); | 1187 InitializeCompositorThread(); |
1192 | 1188 |
1193 if (!input_event_filter_.get()) { | 1189 if (!input_event_filter_.get()) { |
1194 // Always provide an input event filter implementation to ensure consistent | 1190 // Always provide an input event filter implementation to ensure consistent |
1195 // input event scheduling and prioritization. | 1191 // input event scheduling and prioritization. |
1196 // TODO(jdduke): Merge InputEventFilter, InputHandlerManager and | 1192 // TODO(jdduke): Merge InputEventFilter, InputHandlerManager and |
1197 // MainThreadInputEventFilter, crbug.com/436057. | 1193 // MainThreadInputEventFilter, crbug.com/436057. |
1198 input_event_filter_ = new MainThreadInputEventFilter( | 1194 input_event_filter_ = new MainThreadInputEventFilter( |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2087 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) | 2083 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) |
2088 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; | 2084 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; |
2089 | 2085 |
2090 blink::mainThreadIsolate()->MemoryPressureNotification( | 2086 blink::mainThreadIsolate()->MemoryPressureNotification( |
2091 v8_memory_pressure_level); | 2087 v8_memory_pressure_level); |
2092 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2088 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
2093 v8_memory_pressure_level); | 2089 v8_memory_pressure_level); |
2094 } | 2090 } |
2095 | 2091 |
2096 } // namespace content | 2092 } // namespace content |
OLD | NEW |