| 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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 | 649 |
| 650 #if defined(OS_ANDROID) || defined(OS_LINUX) | 650 #if defined(OS_ANDROID) || defined(OS_LINUX) |
| 651 if (!command_line.HasSwitch( | 651 if (!command_line.HasSwitch( |
| 652 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { | 652 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { |
| 653 cc::TileTaskWorkerPool::SetWorkerThreadPriority( | 653 cc::TileTaskWorkerPool::SetWorkerThreadPriority( |
| 654 base::kThreadPriority_Background); | 654 base::kThreadPriority_Background); |
| 655 } | 655 } |
| 656 #endif | 656 #endif |
| 657 } | 657 } |
| 658 | 658 |
| 659 base::DiscardableMemoryShmemAllocator::SetInstance( | 659 // In single process, browser main loop set up the discardable memory |
| 660 ChildThreadImpl::discardable_shared_memory_manager()); | 660 // allocator. |
| 661 if (!command_line.HasSwitch(switches::kSingleProcess)) { |
| 662 base::DiscardableMemoryShmemAllocator::SetInstance( |
| 663 ChildThreadImpl::discardable_shared_memory_manager()); |
| 664 } |
| 661 | 665 |
| 662 service_registry()->AddService<RenderFrameSetup>( | 666 service_registry()->AddService<RenderFrameSetup>( |
| 663 base::Bind(CreateRenderFrameSetup)); | 667 base::Bind(CreateRenderFrameSetup)); |
| 664 | 668 |
| 665 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); | 669 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); |
| 666 } | 670 } |
| 667 | 671 |
| 668 RenderThreadImpl::~RenderThreadImpl() { | 672 RenderThreadImpl::~RenderThreadImpl() { |
| 669 } | 673 } |
| 670 | 674 |
| (...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 1797 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
| 1794 mojo::ServiceProviderPtr exposed_services) | 1798 mojo::ServiceProviderPtr exposed_services) |
| 1795 : services(services.Pass()), | 1799 : services(services.Pass()), |
| 1796 exposed_services(exposed_services.Pass()) { | 1800 exposed_services(exposed_services.Pass()) { |
| 1797 } | 1801 } |
| 1798 | 1802 |
| 1799 RenderThreadImpl::PendingRenderFrameConnect::~PendingRenderFrameConnect() { | 1803 RenderThreadImpl::PendingRenderFrameConnect::~PendingRenderFrameConnect() { |
| 1800 } | 1804 } |
| 1801 | 1805 |
| 1802 } // namespace content | 1806 } // namespace content |
| OLD | NEW |