Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1171173002: [Background Sync] Use Mojo IPC to fire background sync events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove Chromium IPC for Sync from unit tests' Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 780
780 // TODO(boliu): In single process, browser main loop should set up the 781 // TODO(boliu): In single process, browser main loop should set up the
781 // discardable memory manager, and should skip this if kSingleProcess. 782 // discardable memory manager, and should skip this if kSingleProcess.
782 // See crbug.com/503724. 783 // See crbug.com/503724.
783 base::DiscardableMemoryAllocator::SetInstance( 784 base::DiscardableMemoryAllocator::SetInstance(
784 ChildThreadImpl::discardable_shared_memory_manager()); 785 ChildThreadImpl::discardable_shared_memory_manager());
785 786
786 service_registry()->AddService<RenderFrameSetup>( 787 service_registry()->AddService<RenderFrameSetup>(
787 base::Bind(CreateRenderFrameSetup)); 788 base::Bind(CreateRenderFrameSetup));
788 789
790 service_registry()->AddService(
791 base::Bind(&BackgroundSyncClientImpl::Create, GetTaskRunner()));
792
789 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); 793 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, "");
790 } 794 }
791 795
792 RenderThreadImpl::~RenderThreadImpl() { 796 RenderThreadImpl::~RenderThreadImpl() {
793 } 797 }
794 798
795 void RenderThreadImpl::Shutdown() { 799 void RenderThreadImpl::Shutdown() {
796 FOR_EACH_OBSERVER( 800 FOR_EACH_OBSERVER(
797 RenderProcessObserver, observers_, OnRenderProcessShutdown()); 801 RenderProcessObserver, observers_, OnRenderProcessShutdown());
798 802
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 } 1975 }
1972 1976
1973 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1977 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1974 size_t erased = 1978 size_t erased =
1975 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1979 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1976 routing_id_); 1980 routing_id_);
1977 DCHECK_EQ(1u, erased); 1981 DCHECK_EQ(1u, erased);
1978 } 1982 }
1979 1983
1980 } // namespace content 1984 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698