| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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/resource_dispatcher.h" | 63 #include "content/child/resource_dispatcher.h" |
| 64 #include "content/child/resource_scheduling_filter.h" | 64 #include "content/child/resource_scheduling_filter.h" |
| 65 #include "content/child/runtime_features.h" | 65 #include "content/child/runtime_features.h" |
| 66 #include "content/child/thread_safe_sender.h" | 66 #include "content/child/thread_safe_sender.h" |
| 67 #include "content/child/web_database_observer_impl.h" | 67 #include "content/child/web_database_observer_impl.h" |
| 68 #include "content/child/websocket_dispatcher.h" |
| 68 #include "content/child/worker_thread_registry.h" | 69 #include "content/child/worker_thread_registry.h" |
| 69 #include "content/common/child_process_messages.h" | 70 #include "content/common/child_process_messages.h" |
| 70 #include "content/common/content_constants_internal.h" | 71 #include "content/common/content_constants_internal.h" |
| 71 #include "content/common/database_messages.h" | 72 #include "content/common/database_messages.h" |
| 72 #include "content/common/dom_storage/dom_storage_messages.h" | 73 #include "content/common/dom_storage/dom_storage_messages.h" |
| 73 #include "content/common/frame_messages.h" | 74 #include "content/common/frame_messages.h" |
| 74 #include "content/common/gpu/client/context_provider_command_buffer.h" | 75 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 75 #include "content/common/gpu_process_launch_causes.h" | 76 #include "content/common/gpu_process_launch_causes.h" |
| 76 #include "content/common/render_frame_setup.mojom.h" | 77 #include "content/common/render_frame_setup.mojom.h" |
| 77 #include "content/common/render_process_messages.h" | 78 #include "content/common/render_process_messages.h" |
| (...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 if (command_line.HasSwitch(switches::kMemoryMetrics)) { | 1246 if (command_line.HasSwitch(switches::kMemoryMetrics)) { |
| 1246 memory_observer_.reset(new MemoryObserver()); | 1247 memory_observer_.reset(new MemoryObserver()); |
| 1247 message_loop()->AddTaskObserver(memory_observer_.get()); | 1248 message_loop()->AddTaskObserver(memory_observer_.get()); |
| 1248 } | 1249 } |
| 1249 | 1250 |
| 1250 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { | 1251 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { |
| 1251 std::string allowed_ports = | 1252 std::string allowed_ports = |
| 1252 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); | 1253 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); |
| 1253 net::SetExplicitlyAllowedPorts(allowed_ports); | 1254 net::SetExplicitlyAllowedPorts(allowed_ports); |
| 1254 } | 1255 } |
| 1256 |
| 1257 websocket_dispatcher()->SetLoadingTaskRunner( |
| 1258 renderer_scheduler_->LoadingTaskRunner()); |
| 1255 } | 1259 } |
| 1256 | 1260 |
| 1257 void RenderThreadImpl::RegisterSchemes() { | 1261 void RenderThreadImpl::RegisterSchemes() { |
| 1258 // chrome: | 1262 // chrome: |
| 1259 WebString chrome_scheme(base::ASCIIToUTF16(kChromeUIScheme)); | 1263 WebString chrome_scheme(base::ASCIIToUTF16(kChromeUIScheme)); |
| 1260 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_scheme); | 1264 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_scheme); |
| 1261 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( | 1265 WebSecurityPolicy::registerURLSchemeAsNotAllowingJavascriptURLs( |
| 1262 chrome_scheme); | 1266 chrome_scheme); |
| 1263 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_scheme); | 1267 WebSecurityPolicy::registerURLSchemeAsSecure(chrome_scheme); |
| 1264 WebSecurityPolicy::registerURLSchemeAsCORSEnabled(chrome_scheme); | 1268 WebSecurityPolicy::registerURLSchemeAsCORSEnabled(chrome_scheme); |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2088 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) | 2092 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) |
| 2089 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; | 2093 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; |
| 2090 | 2094 |
| 2091 blink::mainThreadIsolate()->MemoryPressureNotification( | 2095 blink::mainThreadIsolate()->MemoryPressureNotification( |
| 2092 v8_memory_pressure_level); | 2096 v8_memory_pressure_level); |
| 2093 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2097 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
| 2094 v8_memory_pressure_level); | 2098 v8_memory_pressure_level); |
| 2095 } | 2099 } |
| 2096 | 2100 |
| 2097 } // namespace content | 2101 } // namespace content |
| OLD | NEW |