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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 | 687 |
687 // TODO(boliu): In single process, browser main loop should set up the | 688 // TODO(boliu): In single process, browser main loop should set up the |
688 // discardable memory manager, and should skip this if kSingleProcess. | 689 // discardable memory manager, and should skip this if kSingleProcess. |
689 // See crbug.com/503724. | 690 // See crbug.com/503724. |
690 base::DiscardableMemoryAllocator::SetInstance( | 691 base::DiscardableMemoryAllocator::SetInstance( |
691 ChildThreadImpl::discardable_shared_memory_manager()); | 692 ChildThreadImpl::discardable_shared_memory_manager()); |
692 | 693 |
693 service_registry()->AddService<RenderFrameSetup>( | 694 service_registry()->AddService<RenderFrameSetup>( |
694 base::Bind(CreateRenderFrameSetup)); | 695 base::Bind(CreateRenderFrameSetup)); |
695 | 696 |
| 697 service_registry()->AddService( |
| 698 base::Bind(&BackgroundSyncClientImpl::Create, GetTaskRunner())); |
| 699 |
696 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); | 700 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); |
697 } | 701 } |
698 | 702 |
699 RenderThreadImpl::~RenderThreadImpl() { | 703 RenderThreadImpl::~RenderThreadImpl() { |
700 } | 704 } |
701 | 705 |
702 void RenderThreadImpl::Shutdown() { | 706 void RenderThreadImpl::Shutdown() { |
703 FOR_EACH_OBSERVER( | 707 FOR_EACH_OBSERVER( |
704 RenderProcessObserver, observers_, OnRenderProcessShutdown()); | 708 RenderProcessObserver, observers_, OnRenderProcessShutdown()); |
705 | 709 |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 } | 1888 } |
1885 | 1889 |
1886 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1890 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
1887 size_t erased = | 1891 size_t erased = |
1888 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1892 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
1889 routing_id_); | 1893 routing_id_); |
1890 DCHECK_EQ(1u, erased); | 1894 DCHECK_EQ(1u, erased); |
1891 } | 1895 } |
1892 | 1896 |
1893 } // namespace content | 1897 } // namespace content |
OLD | NEW |