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

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

Issue 785133006: Enable messaging over a navigator.connect initiated channel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigator-connect_serviceside
Patch Set: comments Created 6 years 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 // 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "content/browser/indexed_db/indexed_db_context_impl.h" 60 #include "content/browser/indexed_db/indexed_db_context_impl.h"
61 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 61 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
62 #include "content/browser/loader/resource_message_filter.h" 62 #include "content/browser/loader/resource_message_filter.h"
63 #include "content/browser/loader/resource_scheduler_filter.h" 63 #include "content/browser/loader/resource_scheduler_filter.h"
64 #include "content/browser/media/capture/audio_mirroring_manager.h" 64 #include "content/browser/media/capture/audio_mirroring_manager.h"
65 #include "content/browser/media/media_internals.h" 65 #include "content/browser/media/media_internals.h"
66 #include "content/browser/media/midi_host.h" 66 #include "content/browser/media/midi_host.h"
67 #include "content/browser/message_port_message_filter.h" 67 #include "content/browser/message_port_message_filter.h"
68 #include "content/browser/mime_registry_message_filter.h" 68 #include "content/browser/mime_registry_message_filter.h"
69 #include "content/browser/mojo/mojo_application_host.h" 69 #include "content/browser/mojo/mojo_application_host.h"
70 #include "content/browser/navigator_connect/navigator_connect_context.h"
70 #include "content/browser/navigator_connect/navigator_connect_dispatcher_host.h" 71 #include "content/browser/navigator_connect/navigator_connect_dispatcher_host.h"
71 #include "content/browser/notifications/notification_message_filter.h" 72 #include "content/browser/notifications/notification_message_filter.h"
72 #include "content/browser/permissions/permission_service_context.h" 73 #include "content/browser/permissions/permission_service_context.h"
73 #include "content/browser/permissions/permission_service_impl.h" 74 #include "content/browser/permissions/permission_service_impl.h"
74 #include "content/browser/profiler_message_filter.h" 75 #include "content/browser/profiler_message_filter.h"
75 #include "content/browser/push_messaging/push_messaging_message_filter.h" 76 #include "content/browser/push_messaging/push_messaging_message_filter.h"
76 #include "content/browser/quota_dispatcher_host.h" 77 #include "content/browser/quota_dispatcher_host.h"
77 #include "content/browser/renderer_host/clipboard_message_filter.h" 78 #include "content/browser/renderer_host/clipboard_message_filter.h"
78 #include "content/browser/renderer_host/database_message_filter.h" 79 #include "content/browser/renderer_host/database_message_filter.h"
79 #include "content/browser/renderer_host/file_utilities_message_filter.h" 80 #include "content/browser/renderer_host/file_utilities_message_filter.h"
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 AddFilter(new MemoryBenchmarkMessageFilter()); 881 AddFilter(new MemoryBenchmarkMessageFilter());
881 #endif 882 #endif
882 AddFilter(new PushMessagingMessageFilter( 883 AddFilter(new PushMessagingMessageFilter(
883 GetID(), storage_partition_impl_->GetServiceWorkerContext())); 884 GetID(), storage_partition_impl_->GetServiceWorkerContext()));
884 #if defined(OS_ANDROID) 885 #if defined(OS_ANDROID)
885 AddFilter(new ScreenOrientationMessageFilterAndroid()); 886 AddFilter(new ScreenOrientationMessageFilterAndroid());
886 #endif 887 #endif
887 AddFilter(new GeofencingDispatcherHost( 888 AddFilter(new GeofencingDispatcherHost(
888 storage_partition_impl_->GetGeofencingManager())); 889 storage_partition_impl_->GetGeofencingManager()));
889 AddFilter(new NavigatorConnectDispatcherHost( 890 AddFilter(new NavigatorConnectDispatcherHost(
890 storage_partition_impl_->GetServiceWorkerContext())); 891 storage_partition_impl_->GetServiceWorkerContext(),
892 storage_partition_impl_->GetNavigatorConnectContext()));
891 if (browser_command_line.HasSwitch( 893 if (browser_command_line.HasSwitch(
892 switches::kEnableExperimentalWebPlatformFeatures)) 894 switches::kEnableExperimentalWebPlatformFeatures))
893 AddFilter(new BluetoothDispatcherHost()); 895 AddFilter(new BluetoothDispatcherHost());
894 } 896 }
895 897
896 void RenderProcessHostImpl::RegisterMojoServices() { 898 void RenderProcessHostImpl::RegisterMojoServices() {
897 mojo_application_host_->service_registry()->AddService( 899 mojo_application_host_->service_registry()->AddService(
898 base::Bind(&device::BatteryMonitorImpl::Create)); 900 base::Bind(&device::BatteryMonitorImpl::Create));
899 901
900 mojo_application_host_->service_registry()->AddService( 902 mojo_application_host_->service_registry()->AddService(
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
2351 2353
2352 void RenderProcessHostImpl::DecrementWorkerRefCount() { 2354 void RenderProcessHostImpl::DecrementWorkerRefCount() {
2353 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2355 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2354 DCHECK_GT(worker_ref_count_, 0); 2356 DCHECK_GT(worker_ref_count_, 0);
2355 --worker_ref_count_; 2357 --worker_ref_count_;
2356 if (worker_ref_count_ == 0) 2358 if (worker_ref_count_ == 0)
2357 Cleanup(); 2359 Cleanup();
2358 } 2360 }
2359 2361
2360 } // namespace content 2362 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698