| 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 15 matching lines...) Expand all Loading... |
| 26 #include "base/strings/string16.h" | 26 #include "base/strings/string16.h" |
| 27 #include "base/strings/string_number_conversions.h" | 27 #include "base/strings/string_number_conversions.h" |
| 28 #include "base/strings/string_split.h" | 28 #include "base/strings/string_split.h" |
| 29 #include "base/strings/string_tokenizer.h" | 29 #include "base/strings/string_tokenizer.h" |
| 30 #include "base/strings/sys_string_conversions.h" | 30 #include "base/strings/sys_string_conversions.h" |
| 31 #include "base/strings/utf_string_conversions.h" | 31 #include "base/strings/utf_string_conversions.h" |
| 32 #include "base/thread_task_runner_handle.h" | 32 #include "base/thread_task_runner_handle.h" |
| 33 #include "base/threading/simple_thread.h" | 33 #include "base/threading/simple_thread.h" |
| 34 #include "base/threading/thread_local.h" | 34 #include "base/threading/thread_local.h" |
| 35 #include "base/threading/thread_restrictions.h" | 35 #include "base/threading/thread_restrictions.h" |
| 36 #include "base/trace_event/memory_dump_manager.h" | |
| 37 #include "base/trace_event/trace_event.h" | 36 #include "base/trace_event/trace_event.h" |
| 38 #include "base/values.h" | 37 #include "base/values.h" |
| 39 #include "build/build_config.h" | 38 #include "build/build_config.h" |
| 40 #include "cc/base/histograms.h" | 39 #include "cc/base/histograms.h" |
| 41 #include "cc/base/switches.h" | 40 #include "cc/base/switches.h" |
| 42 #include "cc/blink/web_external_bitmap_impl.h" | 41 #include "cc/blink/web_external_bitmap_impl.h" |
| 43 #include "cc/blink/web_layer_impl.h" | 42 #include "cc/blink/web_layer_impl.h" |
| 44 #include "cc/layers/layer_settings.h" | 43 #include "cc/layers/layer_settings.h" |
| 45 #include "cc/raster/task_graph_runner.h" | 44 #include "cc/raster/task_graph_runner.h" |
| 46 #include "cc/trees/layer_tree_host_common.h" | 45 #include "cc/trees/layer_tree_host_common.h" |
| 47 #include "cc/trees/layer_tree_settings.h" | 46 #include "cc/trees/layer_tree_settings.h" |
| 48 #include "components/scheduler/child/compositor_worker_scheduler.h" | 47 #include "components/scheduler/child/compositor_worker_scheduler.h" |
| 49 #include "components/scheduler/child/webthread_base.h" | 48 #include "components/scheduler/child/webthread_base.h" |
| 50 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" | 49 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" |
| 51 #include "components/scheduler/renderer/renderer_scheduler.h" | 50 #include "components/scheduler/renderer/renderer_scheduler.h" |
| 52 #include "content/child/appcache/appcache_dispatcher.h" | 51 #include "content/child/appcache/appcache_dispatcher.h" |
| 53 #include "content/child/appcache/appcache_frontend_impl.h" | 52 #include "content/child/appcache/appcache_frontend_impl.h" |
| 53 #include "content/child/blob_storage/blob_message_filter.h" |
| 54 #include "content/child/child_discardable_shared_memory_manager.h" | 54 #include "content/child/child_discardable_shared_memory_manager.h" |
| 55 #include "content/child/child_gpu_memory_buffer_manager.h" | 55 #include "content/child/child_gpu_memory_buffer_manager.h" |
| 56 #include "content/child/child_histogram_message_filter.h" | 56 #include "content/child/child_histogram_message_filter.h" |
| 57 #include "content/child/child_resource_message_filter.h" | 57 #include "content/child/child_resource_message_filter.h" |
| 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/npapi/npobject_util.h" | 63 #include "content/child/npapi/npobject_util.h" |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 // Note: This may reorder messages from the ResourceDispatcher with respect to | 671 // Note: This may reorder messages from the ResourceDispatcher with respect to |
| 672 // other subsystems. | 672 // other subsystems. |
| 673 resource_dispatch_throttler_.reset(new ResourceDispatchThrottler( | 673 resource_dispatch_throttler_.reset(new ResourceDispatchThrottler( |
| 674 static_cast<RenderThread*>(this), renderer_scheduler_.get(), | 674 static_cast<RenderThread*>(this), renderer_scheduler_.get(), |
| 675 base::TimeDelta::FromSecondsD(kThrottledResourceRequestFlushPeriodS), | 675 base::TimeDelta::FromSecondsD(kThrottledResourceRequestFlushPeriodS), |
| 676 kMaxResourceRequestsPerFlushWhenThrottled)); | 676 kMaxResourceRequestsPerFlushWhenThrottled)); |
| 677 resource_dispatcher()->set_message_sender(resource_dispatch_throttler_.get()); | 677 resource_dispatcher()->set_message_sender(resource_dispatch_throttler_.get()); |
| 678 | 678 |
| 679 media_stream_center_ = NULL; | 679 media_stream_center_ = NULL; |
| 680 | 680 |
| 681 blob_message_filter_ = new BlobMessageFilter(); |
| 682 AddFilter(blob_message_filter_.get()); |
| 681 db_message_filter_ = new DBMessageFilter(); | 683 db_message_filter_ = new DBMessageFilter(); |
| 682 AddFilter(db_message_filter_.get()); | 684 AddFilter(db_message_filter_.get()); |
| 683 | 685 |
| 684 vc_manager_.reset(new VideoCaptureImplManager()); | 686 vc_manager_.reset(new VideoCaptureImplManager()); |
| 685 AddFilter(vc_manager_->video_capture_message_filter()); | 687 AddFilter(vc_manager_->video_capture_message_filter()); |
| 686 | 688 |
| 687 browser_plugin_manager_.reset(new BrowserPluginManager()); | 689 browser_plugin_manager_.reset(new BrowserPluginManager()); |
| 688 AddObserver(browser_plugin_manager_.get()); | 690 AddObserver(browser_plugin_manager_.get()); |
| 689 | 691 |
| 690 #if defined(ENABLE_WEBRTC) | 692 #if defined(ENABLE_WEBRTC) |
| (...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2178 } | 2180 } |
| 2179 | 2181 |
| 2180 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 2182 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 2181 size_t erased = | 2183 size_t erased = |
| 2182 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 2184 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 2183 routing_id_); | 2185 routing_id_); |
| 2184 DCHECK_EQ(1u, erased); | 2186 DCHECK_EQ(1u, erased); |
| 2185 } | 2187 } |
| 2186 | 2188 |
| 2187 } // namespace content | 2189 } // namespace content |
| OLD | NEW |