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

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: Fix compile error Created 4 years, 4 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "content/child/child_shared_bitmap_manager.h" 62 #include "content/child/child_shared_bitmap_manager.h"
63 #include "content/child/content_child_helpers.h" 63 #include "content/child/content_child_helpers.h"
64 #include "content/child/db_message_filter.h" 64 #include "content/child/db_message_filter.h"
65 #include "content/child/indexed_db/indexed_db_dispatcher.h" 65 #include "content/child/indexed_db/indexed_db_dispatcher.h"
66 #include "content/child/indexed_db/indexed_db_message_filter.h" 66 #include "content/child/indexed_db/indexed_db_message_filter.h"
67 #include "content/child/resource_dispatcher.h" 67 #include "content/child/resource_dispatcher.h"
68 #include "content/child/resource_scheduling_filter.h" 68 #include "content/child/resource_scheduling_filter.h"
69 #include "content/child/runtime_features.h" 69 #include "content/child/runtime_features.h"
70 #include "content/child/thread_safe_sender.h" 70 #include "content/child/thread_safe_sender.h"
71 #include "content/child/web_database_observer_impl.h" 71 #include "content/child/web_database_observer_impl.h"
72 #include "content/child/websocket_message_filter.h"
73 #include "content/child/worker_thread_registry.h" 72 #include "content/child/worker_thread_registry.h"
74 #include "content/common/child_process_messages.h" 73 #include "content/common/child_process_messages.h"
75 #include "content/common/content_constants_internal.h" 74 #include "content/common/content_constants_internal.h"
76 #include "content/common/dom_storage/dom_storage_messages.h" 75 #include "content/common/dom_storage/dom_storage_messages.h"
77 #include "content/common/frame_messages.h" 76 #include "content/common/frame_messages.h"
78 #include "content/common/frame_owner_properties.h" 77 #include "content/common/frame_owner_properties.h"
79 #include "content/common/gpu/client/context_provider_command_buffer.h" 78 #include "content/common/gpu/client/context_provider_command_buffer.h"
80 #include "content/common/render_process_messages.h" 79 #include "content/common/render_process_messages.h"
81 #include "content/common/resource_messages.h" 80 #include "content/common/resource_messages.h"
82 #include "content/common/service_worker/embedded_worker_setup.mojom.h" 81 #include "content/common/service_worker/embedded_worker_setup.mojom.h"
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 resource_task_queue2, resource_dispatcher())); 1212 resource_task_queue2, resource_dispatcher()));
1214 channel()->AddFilter(filter.get()); 1213 channel()->AddFilter(filter.get());
1215 resource_dispatcher()->SetResourceSchedulingFilter(filter); 1214 resource_dispatcher()->SetResourceSchedulingFilter(filter);
1216 1215
1217 // The ChildResourceMessageFilter and the ResourceDispatcher need to use the 1216 // The ChildResourceMessageFilter and the ResourceDispatcher need to use the
1218 // same queue to ensure tasks are executed in the expected order. 1217 // same queue to ensure tasks are executed in the expected order.
1219 child_resource_message_filter()->SetMainThreadTaskRunner( 1218 child_resource_message_filter()->SetMainThreadTaskRunner(
1220 resource_task_queue2); 1219 resource_task_queue2);
1221 resource_dispatcher()->SetMainThreadTaskRunner(resource_task_queue2); 1220 resource_dispatcher()->SetMainThreadTaskRunner(resource_task_queue2);
1222 1221
1223 websocket_message_filter()->SetLoadingTaskRunner(
1224 renderer_scheduler_->LoadingTaskRunner());
1225
1226 if (!command_line.HasSwitch(switches::kDisableThreadedCompositing) && 1222 if (!command_line.HasSwitch(switches::kDisableThreadedCompositing) &&
1227 !command_line.HasSwitch(switches::kUseRemoteCompositing)) 1223 !command_line.HasSwitch(switches::kUseRemoteCompositing))
1228 InitializeCompositorThread(); 1224 InitializeCompositorThread();
1229 1225
1230 if (!input_event_filter_.get()) { 1226 if (!input_event_filter_.get()) {
1231 // Always provide an input event filter implementation to ensure consistent 1227 // Always provide an input event filter implementation to ensure consistent
1232 // input event scheduling and prioritization. 1228 // input event scheduling and prioritization.
1233 // TODO(jdduke): Merge InputEventFilter, InputHandlerManager and 1229 // TODO(jdduke): Merge InputEventFilter, InputHandlerManager and
1234 // MainThreadInputEventFilter, crbug.com/436057. 1230 // MainThreadInputEventFilter, crbug.com/436057.
1235 input_event_filter_ = new MainThreadInputEventFilter( 1231 input_event_filter_ = new MainThreadInputEventFilter(
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
2239 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) 2235 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical)
2240 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; 2236 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate;
2241 2237
2242 blink::mainThreadIsolate()->MemoryPressureNotification( 2238 blink::mainThreadIsolate()->MemoryPressureNotification(
2243 v8_memory_pressure_level); 2239 v8_memory_pressure_level);
2244 blink::MemoryPressureNotificationToWorkerThreadIsolates( 2240 blink::MemoryPressureNotificationToWorkerThreadIsolates(
2245 v8_memory_pressure_level); 2241 v8_memory_pressure_level);
2246 } 2242 }
2247 2243
2248 } // namespace content 2244 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698