| 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 11 matching lines...) Expand all Loading... |
| 22 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
| 23 #include "base/strings/string16.h" | 23 #include "base/strings/string16.h" |
| 24 #include "base/strings/string_number_conversions.h" | 24 #include "base/strings/string_number_conversions.h" |
| 25 #include "base/strings/string_tokenizer.h" | 25 #include "base/strings/string_tokenizer.h" |
| 26 #include "base/strings/sys_string_conversions.h" | 26 #include "base/strings/sys_string_conversions.h" |
| 27 #include "base/strings/utf_string_conversions.h" | 27 #include "base/strings/utf_string_conversions.h" |
| 28 #include "base/thread_task_runner_handle.h" | 28 #include "base/thread_task_runner_handle.h" |
| 29 #include "base/threading/simple_thread.h" | 29 #include "base/threading/simple_thread.h" |
| 30 #include "base/threading/thread_local.h" | 30 #include "base/threading/thread_local.h" |
| 31 #include "base/threading/thread_restrictions.h" | 31 #include "base/threading/thread_restrictions.h" |
| 32 #include "base/trace_event/memory_dump_manager.h" |
| 32 #include "base/trace_event/trace_event.h" | 33 #include "base/trace_event/trace_event.h" |
| 33 #include "base/values.h" | 34 #include "base/values.h" |
| 34 #include "cc/base/switches.h" | 35 #include "cc/base/switches.h" |
| 35 #include "cc/blink/web_external_bitmap_impl.h" | 36 #include "cc/blink/web_external_bitmap_impl.h" |
| 36 #include "cc/blink/web_layer_impl.h" | 37 #include "cc/blink/web_layer_impl.h" |
| 37 #include "cc/raster/task_graph_runner.h" | 38 #include "cc/raster/task_graph_runner.h" |
| 38 #include "cc/trees/layer_tree_settings.h" | 39 #include "cc/trees/layer_tree_settings.h" |
| 39 #include "components/scheduler/renderer/renderer_scheduler.h" | 40 #include "components/scheduler/renderer/renderer_scheduler.h" |
| 40 #include "content/child/appcache/appcache_dispatcher.h" | 41 #include "content/child/appcache/appcache_dispatcher.h" |
| 41 #include "content/child/appcache/appcache_frontend_impl.h" | 42 #include "content/child/appcache/appcache_frontend_impl.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 #include "ipc/ipc_channel_handle.h" | 121 #include "ipc/ipc_channel_handle.h" |
| 121 #include "ipc/ipc_platform_file.h" | 122 #include "ipc/ipc_platform_file.h" |
| 122 #include "ipc/mojo/ipc_channel_mojo.h" | 123 #include "ipc/mojo/ipc_channel_mojo.h" |
| 123 #include "media/base/audio_hardware_config.h" | 124 #include "media/base/audio_hardware_config.h" |
| 124 #include "media/base/media.h" | 125 #include "media/base/media.h" |
| 125 #include "media/renderers/gpu_video_accelerator_factories.h" | 126 #include "media/renderers/gpu_video_accelerator_factories.h" |
| 126 #include "mojo/common/common_type_converters.h" | 127 #include "mojo/common/common_type_converters.h" |
| 127 #include "net/base/net_errors.h" | 128 #include "net/base/net_errors.h" |
| 128 #include "net/base/net_util.h" | 129 #include "net/base/net_util.h" |
| 129 #include "skia/ext/event_tracer_impl.h" | 130 #include "skia/ext/event_tracer_impl.h" |
| 131 #include "skia/ext/skia_memory_dump_provider.h" |
| 130 #include "third_party/WebKit/public/platform/WebString.h" | 132 #include "third_party/WebKit/public/platform/WebString.h" |
| 131 #include "third_party/WebKit/public/platform/WebThread.h" | 133 #include "third_party/WebKit/public/platform/WebThread.h" |
| 132 #include "third_party/WebKit/public/web/WebCache.h" | 134 #include "third_party/WebKit/public/web/WebCache.h" |
| 133 #include "third_party/WebKit/public/web/WebColorName.h" | 135 #include "third_party/WebKit/public/web/WebColorName.h" |
| 134 #include "third_party/WebKit/public/web/WebDatabase.h" | 136 #include "third_party/WebKit/public/web/WebDatabase.h" |
| 135 #include "third_party/WebKit/public/web/WebDocument.h" | 137 #include "third_party/WebKit/public/web/WebDocument.h" |
| 136 #include "third_party/WebKit/public/web/WebFrame.h" | 138 #include "third_party/WebKit/public/web/WebFrame.h" |
| 137 #include "third_party/WebKit/public/web/WebImageCache.h" | 139 #include "third_party/WebKit/public/web/WebImageCache.h" |
| 138 #include "third_party/WebKit/public/web/WebKit.h" | 140 #include "third_party/WebKit/public/web/WebKit.h" |
| 139 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" | 141 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 | 732 |
| 731 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); | 733 AddFilter((new IndexedDBMessageFilter(thread_safe_sender()))->GetFilter()); |
| 732 | 734 |
| 733 AddFilter((new CacheStorageMessageFilter(thread_safe_sender()))->GetFilter()); | 735 AddFilter((new CacheStorageMessageFilter(thread_safe_sender()))->GetFilter()); |
| 734 | 736 |
| 735 AddFilter((new ServiceWorkerContextMessageFilter())->GetFilter()); | 737 AddFilter((new ServiceWorkerContextMessageFilter())->GetFilter()); |
| 736 | 738 |
| 737 GetContentClient()->renderer()->RenderThreadStarted(); | 739 GetContentClient()->renderer()->RenderThreadStarted(); |
| 738 | 740 |
| 739 InitSkiaEventTracer(); | 741 InitSkiaEventTracer(); |
| 742 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 743 skia::SkiaMemoryDumpProvider::GetInstance()); |
| 740 | 744 |
| 741 const base::CommandLine& command_line = | 745 const base::CommandLine& command_line = |
| 742 *base::CommandLine::ForCurrentProcess(); | 746 *base::CommandLine::ForCurrentProcess(); |
| 743 | 747 |
| 744 cc::LayerSettings layer_settings; | 748 cc::LayerSettings layer_settings; |
| 745 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) | 749 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) |
| 746 layer_settings.use_compositor_animation_timelines = true; | 750 layer_settings.use_compositor_animation_timelines = true; |
| 747 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); | 751 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); |
| 748 | 752 |
| 749 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 753 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 } | 2042 } |
| 2039 | 2043 |
| 2040 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 2044 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 2041 size_t erased = | 2045 size_t erased = |
| 2042 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 2046 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 2043 routing_id_); | 2047 routing_id_); |
| 2044 DCHECK_EQ(1u, erased); | 2048 DCHECK_EQ(1u, erased); |
| 2045 } | 2049 } |
| 2046 | 2050 |
| 2047 } // namespace content | 2051 } // namespace content |
| OLD | NEW |