| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 195 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
| 196 #include "v8/src/third_party/vtune/v8-vtune.h" | 196 #include "v8/src/third_party/vtune/v8-vtune.h" |
| 197 #endif | 197 #endif |
| 198 | 198 |
| 199 #if defined(MOJO_SHELL_CLIENT) | 199 #if defined(MOJO_SHELL_CLIENT) |
| 200 #include "content/public/common/mojo_shell_connection.h" | 200 #include "content/public/common/mojo_shell_connection.h" |
| 201 #include "content/renderer/mus/render_widget_window_tree_client_factory.h" | 201 #include "content/renderer/mus/render_widget_window_tree_client_factory.h" |
| 202 #endif | 202 #endif |
| 203 | 203 |
| 204 #if defined(ENABLE_IPC_FUZZER) |
| 205 #include "content/common/external_ipc_dumper.h" |
| 206 #endif |
| 207 |
| 204 using base::ThreadRestrictions; | 208 using base::ThreadRestrictions; |
| 205 using blink::WebDocument; | 209 using blink::WebDocument; |
| 206 using blink::WebFrame; | 210 using blink::WebFrame; |
| 207 using blink::WebNetworkStateNotifier; | 211 using blink::WebNetworkStateNotifier; |
| 208 using blink::WebRuntimeFeatures; | 212 using blink::WebRuntimeFeatures; |
| 209 using blink::WebScriptController; | 213 using blink::WebScriptController; |
| 210 using blink::WebSecurityPolicy; | 214 using blink::WebSecurityPolicy; |
| 211 using blink::WebString; | 215 using blink::WebString; |
| 212 using blink::WebView; | 216 using blink::WebView; |
| 213 using scheduler::WebThreadImplForWorkerScheduler; | 217 using scheduler::WebThreadImplForWorkerScheduler; |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 | 703 |
| 700 GetContentClient()->renderer()->RenderThreadStarted(); | 704 GetContentClient()->renderer()->RenderThreadStarted(); |
| 701 | 705 |
| 702 InitSkiaEventTracer(); | 706 InitSkiaEventTracer(); |
| 703 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 707 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 704 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); | 708 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); |
| 705 | 709 |
| 706 const base::CommandLine& command_line = | 710 const base::CommandLine& command_line = |
| 707 *base::CommandLine::ForCurrentProcess(); | 711 *base::CommandLine::ForCurrentProcess(); |
| 708 | 712 |
| 713 #if defined(ENABLE_IPC_FUZZER) |
| 714 if (command_line.HasSwitch(switches::kIpcDumpDirectory)) { |
| 715 base::FilePath dump_directory = |
| 716 command_line.GetSwitchValuePath(switches::kIpcDumpDirectory); |
| 717 IPC::ChannelProxy::OutgoingMessageFilter* filter = |
| 718 LoadExternalIPCDumper(dump_directory); |
| 719 GetChannel()->set_outgoing_message_filter(filter); |
| 720 } |
| 721 #endif |
| 722 |
| 709 cc::SetClientNameForMetrics("Renderer"); | 723 cc::SetClientNameForMetrics("Renderer"); |
| 710 | 724 |
| 711 is_threaded_animation_enabled_ = | 725 is_threaded_animation_enabled_ = |
| 712 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); | 726 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 713 | 727 |
| 714 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 728 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
| 715 is_partial_raster_enabled_ = | 729 is_partial_raster_enabled_ = |
| 716 !command_line.HasSwitch(switches::kDisablePartialRaster); | 730 !command_line.HasSwitch(switches::kDisablePartialRaster); |
| 717 is_gpu_memory_buffer_compositor_resources_enabled_ = command_line.HasSwitch( | 731 is_gpu_memory_buffer_compositor_resources_enabled_ = command_line.HasSwitch( |
| 718 switches::kEnableGpuMemoryBufferCompositorResources); | 732 switches::kEnableGpuMemoryBufferCompositorResources); |
| (...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2082 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) | 2096 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) |
| 2083 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; | 2097 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; |
| 2084 | 2098 |
| 2085 blink::mainThreadIsolate()->MemoryPressureNotification( | 2099 blink::mainThreadIsolate()->MemoryPressureNotification( |
| 2086 v8_memory_pressure_level); | 2100 v8_memory_pressure_level); |
| 2087 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2101 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
| 2088 v8_memory_pressure_level); | 2102 v8_memory_pressure_level); |
| 2089 } | 2103 } |
| 2090 | 2104 |
| 2091 } // namespace content | 2105 } // namespace content |
| OLD | NEW |