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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2004643002: Implement BroadcastChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert to mojo interface of PS4 to have less logic in renderer Created 4 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 28 matching lines...) Expand all
39 #include "base/sys_info.h" 39 #include "base/sys_info.h"
40 #include "base/threading/thread.h" 40 #include "base/threading/thread.h"
41 #include "base/threading/thread_restrictions.h" 41 #include "base/threading/thread_restrictions.h"
42 #include "base/threading/thread_task_runner_handle.h" 42 #include "base/threading/thread_task_runner_handle.h"
43 #include "base/trace_event/trace_event.h" 43 #include "base/trace_event/trace_event.h"
44 #include "base/tracked_objects.h" 44 #include "base/tracked_objects.h"
45 #include "build/build_config.h" 45 #include "build/build_config.h"
46 #include "cc/base/switches.h" 46 #include "cc/base/switches.h"
47 #include "components/scheduler/common/scheduler_switches.h" 47 #include "components/scheduler/common/scheduler_switches.h"
48 #include "components/tracing/common/tracing_switches.h" 48 #include "components/tracing/common/tracing_switches.h"
49 #include "components/webmessaging/broadcast_channel_service.h"
49 #include "content/browser/appcache/appcache_dispatcher_host.h" 50 #include "content/browser/appcache/appcache_dispatcher_host.h"
50 #include "content/browser/appcache/chrome_appcache_service.h" 51 #include "content/browser/appcache/chrome_appcache_service.h"
51 #include "content/browser/background_sync/background_sync_service_impl.h" 52 #include "content/browser/background_sync/background_sync_service_impl.h"
52 #include "content/browser/bad_message.h" 53 #include "content/browser/bad_message.h"
53 #include "content/browser/blob_storage/blob_dispatcher_host.h" 54 #include "content/browser/blob_storage/blob_dispatcher_host.h"
54 #include "content/browser/blob_storage/chrome_blob_storage_context.h" 55 #include "content/browser/blob_storage/chrome_blob_storage_context.h"
55 #include "content/browser/browser_child_process_host_impl.h" 56 #include "content/browser/browser_child_process_host_impl.h"
56 #include "content/browser/browser_main.h" 57 #include "content/browser/browser_main.h"
57 #include "content/browser/browser_main_loop.h" 58 #include "content/browser/browser_main_loop.h"
58 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" 59 #include "content/browser/browser_plugin/browser_plugin_message_filter.h"
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 1083
1083 mojo_application_host_->service_registry()->AddService(base::Bind( 1084 mojo_application_host_->service_registry()->AddService(base::Bind(
1084 &PlatformNotificationContextImpl::CreateService, 1085 &PlatformNotificationContextImpl::CreateService,
1085 base::Unretained( 1086 base::Unretained(
1086 storage_partition_impl_->GetPlatformNotificationContext()), GetID())); 1087 storage_partition_impl_->GetPlatformNotificationContext()), GetID()));
1087 1088
1088 mojo_application_host_->service_registry()->AddService( 1089 mojo_application_host_->service_registry()->AddService(
1089 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, 1090 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService,
1090 base::Unretained(this))); 1091 base::Unretained(this)));
1091 1092
1093 mojo_application_host_->service_registry()->AddService(base::Bind(
1094 &webmessaging::BroadcastChannelService::Connect,
1095 base::Unretained(storage_partition_impl_->GetBroadcastChannelService())));
1096
1092 mojo_application_host_->service_registry()->AddService( 1097 mojo_application_host_->service_registry()->AddService(
1093 base::Bind(&MimeRegistryImpl::Create), 1098 base::Bind(&MimeRegistryImpl::Create),
1094 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); 1099 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
1095 1100
1096 #if defined(OS_ANDROID) 1101 #if defined(OS_ANDROID)
1097 ServiceRegistrarAndroid::RegisterProcessHostServices( 1102 ServiceRegistrarAndroid::RegisterProcessHostServices(
1098 mojo_application_host_->service_registry_android()); 1103 mojo_application_host_->service_registry_android());
1099 #endif 1104 #endif
1100 1105
1101 GetContentClient()->browser()->RegisterRenderProcessMojoServices( 1106 GetContentClient()->browser()->RegisterRenderProcessMojoServices(
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
2798 2803
2799 // Skip widgets in other processes. 2804 // Skip widgets in other processes.
2800 if (rvh->GetProcess()->GetID() != GetID()) 2805 if (rvh->GetProcess()->GetID() != GetID())
2801 continue; 2806 continue;
2802 2807
2803 rvh->OnWebkitPreferencesChanged(); 2808 rvh->OnWebkitPreferencesChanged();
2804 } 2809 }
2805 } 2810 }
2806 2811
2807 } // namespace content 2812 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698