| 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 <vector> | 10 #include <vector> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "content/public/renderer/content_renderer_client.h" | 50 #include "content/public/renderer/content_renderer_client.h" |
| 51 #include "content/public/renderer/render_process_observer.h" | 51 #include "content/public/renderer/render_process_observer.h" |
| 52 #include "content/public/renderer/render_view_visitor.h" | 52 #include "content/public/renderer/render_view_visitor.h" |
| 53 #include "content/renderer/devtools/devtools_agent_filter.h" | 53 #include "content/renderer/devtools/devtools_agent_filter.h" |
| 54 #include "content/renderer/dom_storage/dom_storage_dispatcher.h" | 54 #include "content/renderer/dom_storage/dom_storage_dispatcher.h" |
| 55 #include "content/renderer/dom_storage/webstoragearea_impl.h" | 55 #include "content/renderer/dom_storage/webstoragearea_impl.h" |
| 56 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 56 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
| 57 #include "content/renderer/gpu/compositor_output_surface.h" | 57 #include "content/renderer/gpu/compositor_output_surface.h" |
| 58 #include "content/renderer/gpu/gpu_benchmarking_extension.h" | 58 #include "content/renderer/gpu/gpu_benchmarking_extension.h" |
| 59 #include "content/renderer/gpu/input_handler_manager.h" | 59 #include "content/renderer/gpu/input_handler_manager.h" |
| 60 #include "content/renderer/gpu/input_event_filter.h" |
| 60 #include "content/renderer/media/audio_input_message_filter.h" | 61 #include "content/renderer/media/audio_input_message_filter.h" |
| 61 #include "content/renderer/media/audio_message_filter.h" | 62 #include "content/renderer/media/audio_message_filter.h" |
| 62 #include "content/renderer/media/audio_renderer_mixer_manager.h" | 63 #include "content/renderer/media/audio_renderer_mixer_manager.h" |
| 63 #include "content/renderer/media/media_stream_center.h" | 64 #include "content/renderer/media/media_stream_center.h" |
| 64 #include "content/renderer/media/media_stream_dependency_factory.h" | 65 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 65 #include "content/renderer/media/peer_connection_tracker.h" | 66 #include "content/renderer/media/peer_connection_tracker.h" |
| 66 #include "content/renderer/media/video_capture_impl_manager.h" | 67 #include "content/renderer/media/video_capture_impl_manager.h" |
| 67 #include "content/renderer/media/video_capture_message_filter.h" | 68 #include "content/renderer/media/video_capture_message_filter.h" |
| 68 #include "content/renderer/memory_benchmarking_extension.h" | 69 #include "content/renderer/memory_benchmarking_extension.h" |
| 69 #include "content/renderer/p2p/socket_dispatcher.h" | 70 #include "content/renderer/p2p/socket_dispatcher.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 // Shutdown the file thread if it's running. | 450 // Shutdown the file thread if it's running. |
| 450 if (file_thread_) | 451 if (file_thread_) |
| 451 file_thread_->Stop(); | 452 file_thread_->Stop(); |
| 452 | 453 |
| 453 if (compositor_output_surface_filter_.get()) { | 454 if (compositor_output_surface_filter_.get()) { |
| 454 RemoveFilter(compositor_output_surface_filter_.get()); | 455 RemoveFilter(compositor_output_surface_filter_.get()); |
| 455 compositor_output_surface_filter_ = NULL; | 456 compositor_output_surface_filter_ = NULL; |
| 456 } | 457 } |
| 457 | 458 |
| 458 compositor_thread_.reset(); | 459 compositor_thread_.reset(); |
| 459 if (input_handler_manager_) { | 460 input_handler_manager_.reset(); |
| 460 RemoveFilter(input_handler_manager_->GetMessageFilter()); | 461 if (input_event_filter_) { |
| 461 input_handler_manager_.reset(); | 462 RemoveFilter(input_event_filter_.get()); |
| 463 input_event_filter_ = NULL; |
| 462 } | 464 } |
| 463 | 465 |
| 464 if (webkit_platform_support_) | 466 if (webkit_platform_support_) |
| 465 WebKit::shutdown(); | 467 WebKit::shutdown(); |
| 466 | 468 |
| 467 lazy_tls.Pointer()->Set(NULL); | 469 lazy_tls.Pointer()->Set(NULL); |
| 468 | 470 |
| 469 // TODO(port) | 471 // TODO(port) |
| 470 #if defined(OS_WIN) | 472 #if defined(OS_WIN) |
| 471 // Clean up plugin channels before this thread goes away. | 473 // Clean up plugin channels before this thread goes away. |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 compositor_thread_->SetPriority(base::kThreadPriority_Display); | 770 compositor_thread_->SetPriority(base::kThreadPriority_Display); |
| 769 #endif | 771 #endif |
| 770 compositor_message_loop_proxy_ = | 772 compositor_message_loop_proxy_ = |
| 771 compositor_thread_->message_loop_proxy(); | 773 compositor_thread_->message_loop_proxy(); |
| 772 compositor_message_loop_proxy_->PostTask( | 774 compositor_message_loop_proxy_->PostTask( |
| 773 FROM_HERE, | 775 FROM_HERE, |
| 774 base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed), | 776 base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed), |
| 775 false)); | 777 false)); |
| 776 } | 778 } |
| 777 | 779 |
| 780 InputHandlerManagerClient* input_handler_manager_client = NULL; |
| 781 #if defined(OS_ANDROID) |
| 782 if (SynchronousCompositorFactory* factory = |
| 783 SynchronousCompositorFactory::GetInstance()) { |
| 784 input_handler_manager_client = factory->GetInputHandlerManagerClient(); |
| 785 } |
| 786 #endif |
| 787 if (!input_handler_manager_client) { |
| 788 input_event_filter_ = |
| 789 new InputEventFilter(this, compositor_message_loop_proxy_); |
| 790 AddFilter(input_event_filter_.get()); |
| 791 input_handler_manager_client = input_event_filter_.get(); |
| 792 } |
| 778 input_handler_manager_.reset( | 793 input_handler_manager_.reset( |
| 779 new InputHandlerManager(this, compositor_message_loop_proxy_)); | 794 new InputHandlerManager(compositor_message_loop_proxy_, |
| 780 AddFilter(input_handler_manager_->GetMessageFilter()); | 795 input_handler_manager_client)); |
| 781 } | 796 } |
| 782 | 797 |
| 783 scoped_refptr<base::MessageLoopProxy> output_surface_loop; | 798 scoped_refptr<base::MessageLoopProxy> output_surface_loop; |
| 784 if (enable) | 799 if (enable) |
| 785 output_surface_loop = compositor_message_loop_proxy_; | 800 output_surface_loop = compositor_message_loop_proxy_; |
| 786 else | 801 else |
| 787 output_surface_loop = base::MessageLoopProxy::current(); | 802 output_surface_loop = base::MessageLoopProxy::current(); |
| 788 | 803 |
| 789 compositor_output_surface_filter_ = | 804 compositor_output_surface_filter_ = |
| 790 CompositorOutputSurface::CreateFilter(output_surface_loop.get()); | 805 CompositorOutputSurface::CreateFilter(output_surface_loop.get()); |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 | 1364 |
| 1350 void RenderThreadImpl::SetFlingCurveParameters( | 1365 void RenderThreadImpl::SetFlingCurveParameters( |
| 1351 const std::vector<float>& new_touchpad, | 1366 const std::vector<float>& new_touchpad, |
| 1352 const std::vector<float>& new_touchscreen) { | 1367 const std::vector<float>& new_touchscreen) { |
| 1353 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1368 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
| 1354 new_touchscreen); | 1369 new_touchscreen); |
| 1355 | 1370 |
| 1356 } | 1371 } |
| 1357 | 1372 |
| 1358 } // namespace content | 1373 } // namespace content |
| OLD | NEW |