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

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: Created 4 years, 7 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 27 matching lines...) Expand all
38 #include "base/supports_user_data.h" 38 #include "base/supports_user_data.h"
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/trace_event/trace_event.h" 42 #include "base/trace_event/trace_event.h"
43 #include "base/tracked_objects.h" 43 #include "base/tracked_objects.h"
44 #include "build/build_config.h" 44 #include "build/build_config.h"
45 #include "cc/base/switches.h" 45 #include "cc/base/switches.h"
46 #include "components/scheduler/common/scheduler_switches.h" 46 #include "components/scheduler/common/scheduler_switches.h"
47 #include "components/tracing/tracing_switches.h" 47 #include "components/tracing/tracing_switches.h"
48 #include "components/webmessaging/broadcast_channel_service.h"
48 #include "content/browser/appcache/appcache_dispatcher_host.h" 49 #include "content/browser/appcache/appcache_dispatcher_host.h"
49 #include "content/browser/appcache/chrome_appcache_service.h" 50 #include "content/browser/appcache/chrome_appcache_service.h"
50 #include "content/browser/background_sync/background_sync_service_impl.h" 51 #include "content/browser/background_sync/background_sync_service_impl.h"
51 #include "content/browser/bad_message.h" 52 #include "content/browser/bad_message.h"
52 #include "content/browser/blob_storage/blob_dispatcher_host.h" 53 #include "content/browser/blob_storage/blob_dispatcher_host.h"
53 #include "content/browser/blob_storage/chrome_blob_storage_context.h" 54 #include "content/browser/blob_storage/chrome_blob_storage_context.h"
54 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" 55 #include "content/browser/bluetooth/bluetooth_dispatcher_host.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"
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 base::Bind(&ImageCaptureImpl::Create)); 1031 base::Bind(&ImageCaptureImpl::Create));
1031 1032
1032 mojo_application_host_->service_registry()->AddService(base::Bind( 1033 mojo_application_host_->service_registry()->AddService(base::Bind(
1033 &BackgroundSyncContext::CreateService, 1034 &BackgroundSyncContext::CreateService,
1034 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); 1035 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext())));
1035 1036
1036 mojo_application_host_->service_registry()->AddService( 1037 mojo_application_host_->service_registry()->AddService(
1037 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, 1038 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService,
1038 base::Unretained(this))); 1039 base::Unretained(this)));
1039 1040
1041 mojo_application_host_->service_registry()->AddService(base::Bind(
1042 &webmessaging::BroadcastChannelService::ConnectProcess,
1043 base::Unretained(storage_partition_impl_->GetBroadcastChannelService())));
1044
1040 #if defined(OS_ANDROID) 1045 #if defined(OS_ANDROID)
1041 ServiceRegistrarAndroid::RegisterProcessHostServices( 1046 ServiceRegistrarAndroid::RegisterProcessHostServices(
1042 mojo_application_host_->service_registry_android()); 1047 mojo_application_host_->service_registry_android());
1043 #endif 1048 #endif
1044 1049
1045 GetContentClient()->browser()->RegisterRenderProcessMojoServices( 1050 GetContentClient()->browser()->RegisterRenderProcessMojoServices(
1046 mojo_application_host_->service_registry()); 1051 mojo_application_host_->service_registry());
1047 } 1052 }
1048 1053
1049 void RenderProcessHostImpl::CreateStoragePartitionService( 1054 void RenderProcessHostImpl::CreateStoragePartitionService(
(...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after
2761 2766
2762 // Skip widgets in other processes. 2767 // Skip widgets in other processes.
2763 if (rvh->GetProcess()->GetID() != GetID()) 2768 if (rvh->GetProcess()->GetID() != GetID())
2764 continue; 2769 continue;
2765 2770
2766 rvh->OnWebkitPreferencesChanged(); 2771 rvh->OnWebkitPreferencesChanged();
2767 } 2772 }
2768 } 2773 }
2769 2774
2770 } // namespace content 2775 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698