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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 #include "content/common/worker_messages.h" | 71 #include "content/common/worker_messages.h" |
| 72 #include "content/public/common/content_constants.h" | 72 #include "content/public/common/content_constants.h" |
| 73 #include "content/public/common/content_paths.h" | 73 #include "content/public/common/content_paths.h" |
| 74 #include "content/public/common/content_switches.h" | 74 #include "content/public/common/content_switches.h" |
| 75 #include "content/public/common/mojo_channel_switches.h" | 75 #include "content/public/common/mojo_channel_switches.h" |
| 76 #include "content/public/common/renderer_preferences.h" | 76 #include "content/public/common/renderer_preferences.h" |
| 77 #include "content/public/common/url_constants.h" | 77 #include "content/public/common/url_constants.h" |
| 78 #include "content/public/renderer/content_renderer_client.h" | 78 #include "content/public/renderer/content_renderer_client.h" |
| 79 #include "content/public/renderer/render_process_observer.h" | 79 #include "content/public/renderer/render_process_observer.h" |
| 80 #include "content/public/renderer/render_view_visitor.h" | 80 #include "content/public/renderer/render_view_visitor.h" |
| 81 #include "content/renderer/background_sync/background_sync_client_impl.h" | |
| 81 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 82 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
| 82 #include "content/renderer/cache_storage/cache_storage_dispatcher.h" | 83 #include "content/renderer/cache_storage/cache_storage_dispatcher.h" |
| 83 #include "content/renderer/cache_storage/cache_storage_message_filter.h" | 84 #include "content/renderer/cache_storage/cache_storage_message_filter.h" |
| 84 #include "content/renderer/devtools/devtools_agent_filter.h" | 85 #include "content/renderer/devtools/devtools_agent_filter.h" |
| 85 #include "content/renderer/devtools/v8_sampling_profiler.h" | 86 #include "content/renderer/devtools/v8_sampling_profiler.h" |
| 86 #include "content/renderer/dom_storage/dom_storage_dispatcher.h" | 87 #include "content/renderer/dom_storage/dom_storage_dispatcher.h" |
| 87 #include "content/renderer/dom_storage/webstoragearea_impl.h" | 88 #include "content/renderer/dom_storage/webstoragearea_impl.h" |
| 88 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 89 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
| 89 #include "content/renderer/gpu/compositor_external_begin_frame_source.h" | 90 #include "content/renderer/gpu/compositor_external_begin_frame_source.h" |
| 90 #include "content/renderer/gpu/compositor_forwarding_message_filter.h" | 91 #include "content/renderer/gpu/compositor_forwarding_message_filter.h" |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 687 // In single process, browser main loop set up the discardable memory | 688 // In single process, browser main loop set up the discardable memory |
| 688 // allocator. | 689 // allocator. |
| 689 if (!command_line.HasSwitch(switches::kSingleProcess)) { | 690 if (!command_line.HasSwitch(switches::kSingleProcess)) { |
| 690 base::DiscardableMemoryAllocator::SetInstance( | 691 base::DiscardableMemoryAllocator::SetInstance( |
| 691 ChildThreadImpl::discardable_shared_memory_manager()); | 692 ChildThreadImpl::discardable_shared_memory_manager()); |
| 692 } | 693 } |
| 693 | 694 |
| 694 service_registry()->AddService<RenderFrameSetup>( | 695 service_registry()->AddService<RenderFrameSetup>( |
| 695 base::Bind(CreateRenderFrameSetup)); | 696 base::Bind(CreateRenderFrameSetup)); |
| 696 | 697 |
| 698 service_registry()->AddService( | |
| 699 base::Bind(&content::BackgroundSyncClientImpl::Create, GetTaskRunner())); | |
|
michaeln
2015/06/24 00:12:01
content:: not needed
iclelland
2015/06/24 14:29:30
Done.
| |
| 700 | |
| 697 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); | 701 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); |
| 698 } | 702 } |
| 699 | 703 |
| 700 RenderThreadImpl::~RenderThreadImpl() { | 704 RenderThreadImpl::~RenderThreadImpl() { |
| 701 } | 705 } |
| 702 | 706 |
| 703 void RenderThreadImpl::Shutdown() { | 707 void RenderThreadImpl::Shutdown() { |
| 704 FOR_EACH_OBSERVER( | 708 FOR_EACH_OBSERVER( |
| 705 RenderProcessObserver, observers_, OnRenderProcessShutdown()); | 709 RenderProcessObserver, observers_, OnRenderProcessShutdown()); |
| 706 | 710 |
| (...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1889 } | 1893 } |
| 1890 | 1894 |
| 1891 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1895 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1892 size_t erased = | 1896 size_t erased = |
| 1893 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1897 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1894 routing_id_); | 1898 routing_id_); |
| 1895 DCHECK_EQ(1u, erased); | 1899 DCHECK_EQ(1u, erased); |
| 1896 } | 1900 } |
| 1897 | 1901 |
| 1898 } // namespace content | 1902 } // namespace content |
| OLD | NEW |