| 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 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 resource_task_queue2, resource_dispatcher())); | 1225 resource_task_queue2, resource_dispatcher())); |
| 1226 channel()->AddFilter(filter.get()); | 1226 channel()->AddFilter(filter.get()); |
| 1227 resource_dispatcher()->SetResourceSchedulingFilter(filter); | 1227 resource_dispatcher()->SetResourceSchedulingFilter(filter); |
| 1228 | 1228 |
| 1229 // The ChildResourceMessageFilter and the ResourceDispatcher need to use the | 1229 // The ChildResourceMessageFilter and the ResourceDispatcher need to use the |
| 1230 // same queue to ensure tasks are executed in the expected order. | 1230 // same queue to ensure tasks are executed in the expected order. |
| 1231 child_resource_message_filter()->SetMainThreadTaskRunner( | 1231 child_resource_message_filter()->SetMainThreadTaskRunner( |
| 1232 resource_task_queue2); | 1232 resource_task_queue2); |
| 1233 resource_dispatcher()->SetThreadTaskRunner(resource_task_queue2); | 1233 resource_dispatcher()->SetThreadTaskRunner(resource_task_queue2); |
| 1234 | 1234 |
| 1235 if (!command_line.HasSwitch(switches::kDisableThreadedCompositing)) | 1235 InitializeCompositorThread(); |
| 1236 InitializeCompositorThread(); | |
| 1237 | 1236 |
| 1238 if (!input_event_filter_.get()) { | 1237 if (!input_event_filter_.get()) { |
| 1239 // Always provide an input event filter implementation to ensure consistent | 1238 // Always provide an input event filter implementation to ensure consistent |
| 1240 // input event scheduling and prioritization. | 1239 // input event scheduling and prioritization. |
| 1241 // TODO(jdduke): Merge InputEventFilter, InputHandlerManager and | 1240 // TODO(jdduke): Merge InputEventFilter, InputHandlerManager and |
| 1242 // MainThreadInputEventFilter, crbug.com/436057. | 1241 // MainThreadInputEventFilter, crbug.com/436057. |
| 1243 input_event_filter_ = new MainThreadInputEventFilter( | 1242 input_event_filter_ = new MainThreadInputEventFilter( |
| 1244 main_input_callback_.callback(), main_thread_compositor_task_runner_); | 1243 main_input_callback_.callback(), main_thread_compositor_task_runner_); |
| 1245 } | 1244 } |
| 1246 AddFilter(input_event_filter_.get()); | 1245 AddFilter(input_event_filter_.get()); |
| (...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2539 } | 2538 } |
| 2540 } | 2539 } |
| 2541 | 2540 |
| 2542 void RenderThreadImpl::OnRendererInterfaceRequest( | 2541 void RenderThreadImpl::OnRendererInterfaceRequest( |
| 2543 mojom::RendererAssociatedRequest request) { | 2542 mojom::RendererAssociatedRequest request) { |
| 2544 DCHECK(!renderer_binding_.is_bound()); | 2543 DCHECK(!renderer_binding_.is_bound()); |
| 2545 renderer_binding_.Bind(std::move(request)); | 2544 renderer_binding_.Bind(std::move(request)); |
| 2546 } | 2545 } |
| 2547 | 2546 |
| 2548 } // namespace content | 2547 } // namespace content |
| OLD | NEW |