Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 2119973002: Port WebSockets to Mojo IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "content/child/child_shared_bitmap_manager.h" 60 #include "content/child/child_shared_bitmap_manager.h"
61 #include "content/child/content_child_helpers.h" 61 #include "content/child/content_child_helpers.h"
62 #include "content/child/db_message_filter.h" 62 #include "content/child/db_message_filter.h"
63 #include "content/child/indexed_db/indexed_db_dispatcher.h" 63 #include "content/child/indexed_db/indexed_db_dispatcher.h"
64 #include "content/child/indexed_db/indexed_db_message_filter.h" 64 #include "content/child/indexed_db/indexed_db_message_filter.h"
65 #include "content/child/resource_dispatcher.h" 65 #include "content/child/resource_dispatcher.h"
66 #include "content/child/resource_scheduling_filter.h" 66 #include "content/child/resource_scheduling_filter.h"
67 #include "content/child/runtime_features.h" 67 #include "content/child/runtime_features.h"
68 #include "content/child/thread_safe_sender.h" 68 #include "content/child/thread_safe_sender.h"
69 #include "content/child/web_database_observer_impl.h" 69 #include "content/child/web_database_observer_impl.h"
70 #include "content/child/websocket_message_filter.h"
71 #include "content/child/worker_thread_registry.h" 70 #include "content/child/worker_thread_registry.h"
72 #include "content/common/child_process_messages.h" 71 #include "content/common/child_process_messages.h"
73 #include "content/common/content_constants_internal.h" 72 #include "content/common/content_constants_internal.h"
74 #include "content/common/dom_storage/dom_storage_messages.h" 73 #include "content/common/dom_storage/dom_storage_messages.h"
75 #include "content/common/frame_messages.h" 74 #include "content/common/frame_messages.h"
76 #include "content/common/frame_owner_properties.h" 75 #include "content/common/frame_owner_properties.h"
77 #include "content/common/gpu/client/context_provider_command_buffer.h" 76 #include "content/common/gpu/client/context_provider_command_buffer.h"
78 #include "content/common/gpu_process_launch_causes.h" 77 #include "content/common/gpu_process_launch_causes.h"
79 #include "content/common/render_process_messages.h" 78 #include "content/common/render_process_messages.h"
80 #include "content/common/resource_messages.h" 79 #include "content/common/resource_messages.h"
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 resource_task_queue2, resource_dispatcher())); 1220 resource_task_queue2, resource_dispatcher()));
1222 channel()->AddFilter(filter.get()); 1221 channel()->AddFilter(filter.get());
1223 resource_dispatcher()->SetResourceSchedulingFilter(filter); 1222 resource_dispatcher()->SetResourceSchedulingFilter(filter);
1224 1223
1225 // The ChildResourceMessageFilter and the ResourceDispatcher need to use the 1224 // The ChildResourceMessageFilter and the ResourceDispatcher need to use the
1226 // same queue to ensure tasks are executed in the expected order. 1225 // same queue to ensure tasks are executed in the expected order.
1227 child_resource_message_filter()->SetMainThreadTaskRunner( 1226 child_resource_message_filter()->SetMainThreadTaskRunner(
1228 resource_task_queue2); 1227 resource_task_queue2);
1229 resource_dispatcher()->SetMainThreadTaskRunner(resource_task_queue2); 1228 resource_dispatcher()->SetMainThreadTaskRunner(resource_task_queue2);
1230 1229
1231 websocket_message_filter()->SetLoadingTaskRunner(
1232 renderer_scheduler_->LoadingTaskRunner());
1233
1234 if (!command_line.HasSwitch(switches::kDisableThreadedCompositing) && 1230 if (!command_line.HasSwitch(switches::kDisableThreadedCompositing) &&
1235 !command_line.HasSwitch(switches::kUseRemoteCompositing)) 1231 !command_line.HasSwitch(switches::kUseRemoteCompositing))
1236 InitializeCompositorThread(); 1232 InitializeCompositorThread();
1237 1233
1238 if (!input_event_filter_.get()) { 1234 if (!input_event_filter_.get()) {
1239 // Always provide an input event filter implementation to ensure consistent 1235 // Always provide an input event filter implementation to ensure consistent
1240 // input event scheduling and prioritization. 1236 // input event scheduling and prioritization.
1241 // TODO(jdduke): Merge InputEventFilter, InputHandlerManager and 1237 // TODO(jdduke): Merge InputEventFilter, InputHandlerManager and
1242 // MainThreadInputEventFilter, crbug.com/436057. 1238 // MainThreadInputEventFilter, crbug.com/436057.
1243 input_event_filter_ = new MainThreadInputEventFilter( 1239 input_event_filter_ = new MainThreadInputEventFilter(
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) 2234 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical)
2239 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; 2235 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate;
2240 2236
2241 blink::mainThreadIsolate()->MemoryPressureNotification( 2237 blink::mainThreadIsolate()->MemoryPressureNotification(
2242 v8_memory_pressure_level); 2238 v8_memory_pressure_level);
2243 blink::MemoryPressureNotificationToWorkerThreadIsolates( 2239 blink::MemoryPressureNotificationToWorkerThreadIsolates(
2244 v8_memory_pressure_level); 2240 v8_memory_pressure_level);
2245 } 2241 }
2246 2242
2247 } // namespace content 2243 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698