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

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: Retire old IPC; fix memory leak in ServiceWorkerRegistraion test Created 5 years, 6 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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 // In single process, browser main loop set up the discardable memory 697 // In single process, browser main loop set up the discardable memory
697 // allocator. 698 // allocator.
698 if (!command_line.HasSwitch(switches::kSingleProcess)) { 699 if (!command_line.HasSwitch(switches::kSingleProcess)) {
699 base::DiscardableMemoryAllocator::SetInstance( 700 base::DiscardableMemoryAllocator::SetInstance(
700 ChildThreadImpl::discardable_shared_memory_manager()); 701 ChildThreadImpl::discardable_shared_memory_manager());
701 } 702 }
702 703
703 service_registry()->AddService<RenderFrameSetup>( 704 service_registry()->AddService<RenderFrameSetup>(
704 base::Bind(CreateRenderFrameSetup)); 705 base::Bind(CreateRenderFrameSetup));
705 706
707 service_registry()->AddService(
708 base::Bind(&content::BackgroundSyncClientImpl::Create, GetTaskRunner()));
709
706 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); 710 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, "");
707 } 711 }
708 712
709 RenderThreadImpl::~RenderThreadImpl() { 713 RenderThreadImpl::~RenderThreadImpl() {
710 } 714 }
711 715
712 void RenderThreadImpl::Shutdown() { 716 void RenderThreadImpl::Shutdown() {
713 FOR_EACH_OBSERVER( 717 FOR_EACH_OBSERVER(
714 RenderProcessObserver, observers_, OnRenderProcessShutdown()); 718 RenderProcessObserver, observers_, OnRenderProcessShutdown());
715 719
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 } 1904 }
1901 1905
1902 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1906 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1903 size_t erased = 1907 size_t erased =
1904 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1908 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1905 routing_id_); 1909 routing_id_);
1906 DCHECK_EQ(1u, erased); 1910 DCHECK_EQ(1u, erased);
1907 } 1911 }
1908 1912
1909 } // namespace content 1913 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698