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

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: Fixing style nits 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()));
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 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 } 1892 }
1889 1893
1890 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1894 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1891 size_t erased = 1895 size_t erased =
1892 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1896 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1893 routing_id_); 1897 routing_id_);
1894 DCHECK_EQ(1u, erased); 1898 DCHECK_EQ(1u, erased);
1895 } 1899 }
1896 1900
1897 } // namespace content 1901 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698