Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
| 27 #include "base/threading/simple_thread.h" | 27 #include "base/threading/simple_thread.h" |
| 28 #include "base/threading/thread_local.h" | 28 #include "base/threading/thread_local.h" |
| 29 #include "base/threading/thread_restrictions.h" | 29 #include "base/threading/thread_restrictions.h" |
| 30 #include "base/trace_event/trace_event.h" | 30 #include "base/trace_event/trace_event.h" |
| 31 #include "base/values.h" | 31 #include "base/values.h" |
| 32 #include "cc/base/switches.h" | 32 #include "cc/base/switches.h" |
| 33 #include "cc/blink/web_external_bitmap_impl.h" | 33 #include "cc/blink/web_external_bitmap_impl.h" |
| 34 #include "cc/blink/web_layer_impl.h" | 34 #include "cc/blink/web_layer_impl.h" |
| 35 #include "cc/resources/tile_task_worker_pool.h" | 35 #include "cc/resources/tile_task_worker_pool.h" |
| 36 #include "chrome/common/chrome_switches.h" | |
|
Paritosh Kumar
2015/03/26 09:25:34
This Violates checkdeps rules.
PTAL.
| |
| 36 #include "content/child/appcache/appcache_dispatcher.h" | 37 #include "content/child/appcache/appcache_dispatcher.h" |
| 37 #include "content/child/appcache/appcache_frontend_impl.h" | 38 #include "content/child/appcache/appcache_frontend_impl.h" |
| 38 #include "content/child/child_discardable_shared_memory_manager.h" | 39 #include "content/child/child_discardable_shared_memory_manager.h" |
| 39 #include "content/child/child_gpu_memory_buffer_manager.h" | 40 #include "content/child/child_gpu_memory_buffer_manager.h" |
| 40 #include "content/child/child_histogram_message_filter.h" | 41 #include "content/child/child_histogram_message_filter.h" |
| 41 #include "content/child/child_resource_message_filter.h" | 42 #include "content/child/child_resource_message_filter.h" |
| 42 #include "content/child/child_shared_bitmap_manager.h" | 43 #include "content/child/child_shared_bitmap_manager.h" |
| 43 #include "content/child/content_child_helpers.h" | 44 #include "content/child/content_child_helpers.h" |
| 44 #include "content/child/db_message_filter.h" | 45 #include "content/child/db_message_filter.h" |
| 45 #include "content/child/indexed_db/indexed_db_dispatcher.h" | 46 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1118 !is_impl_side_painting_enabled_) | 1119 !is_impl_side_painting_enabled_) |
| 1119 SkGraphics::SetResourceCacheTotalByteLimit(0u); | 1120 SkGraphics::SetResourceCacheTotalByteLimit(0u); |
| 1120 | 1121 |
| 1121 SkGraphics::SetResourceCacheSingleAllocationByteLimit( | 1122 SkGraphics::SetResourceCacheSingleAllocationByteLimit( |
| 1122 kImageCacheSingleAllocationByteLimit); | 1123 kImageCacheSingleAllocationByteLimit); |
| 1123 | 1124 |
| 1124 if (command_line.HasSwitch(switches::kMemoryMetrics)) { | 1125 if (command_line.HasSwitch(switches::kMemoryMetrics)) { |
| 1125 memory_observer_.reset(new MemoryObserver()); | 1126 memory_observer_.reset(new MemoryObserver()); |
| 1126 message_loop()->AddTaskObserver(memory_observer_.get()); | 1127 message_loop()->AddTaskObserver(memory_observer_.get()); |
| 1127 } | 1128 } |
| 1129 | |
| 1130 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { | |
| 1131 std::string allowed_ports = | |
| 1132 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); | |
| 1133 net::SetExplicitlyAllowedPorts(allowed_ports); | |
| 1134 } | |
| 1128 } | 1135 } |
| 1129 | 1136 |
| 1130 void RenderThreadImpl::RegisterSchemes() { | 1137 void RenderThreadImpl::RegisterSchemes() { |
| 1131 // swappedout: pages should not be accessible, and should also | 1138 // swappedout: pages should not be accessible, and should also |
| 1132 // be treated as empty documents that can commit synchronously. | 1139 // be treated as empty documents that can commit synchronously. |
| 1133 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); | 1140 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); |
| 1134 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); | 1141 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); |
| 1135 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); | 1142 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); |
| 1136 } | 1143 } |
| 1137 | 1144 |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1851 } | 1858 } |
| 1852 | 1859 |
| 1853 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1860 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1854 size_t erased = | 1861 size_t erased = |
| 1855 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1862 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1856 routing_id_); | 1863 routing_id_); |
| 1857 DCHECK_EQ(1u, erased); | 1864 DCHECK_EQ(1u, erased); |
| 1858 } | 1865 } |
| 1859 | 1866 |
| 1860 } // namespace content | 1867 } // namespace content |
| OLD | NEW |