| OLD | NEW |
| 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 Loading... |
| 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_dispatcher_host.h" |
| 70 #include "content/browser/notifications/notification_message_filter.h" | 71 #include "content/browser/notifications/notification_message_filter.h" |
| 71 #include "content/browser/permissions/permission_service_context.h" | 72 #include "content/browser/permissions/permission_service_context.h" |
| 72 #include "content/browser/permissions/permission_service_impl.h" | 73 #include "content/browser/permissions/permission_service_impl.h" |
| 73 #include "content/browser/profiler_message_filter.h" | 74 #include "content/browser/profiler_message_filter.h" |
| 74 #include "content/browser/push_messaging/push_messaging_message_filter.h" | 75 #include "content/browser/push_messaging/push_messaging_message_filter.h" |
| 75 #include "content/browser/quota_dispatcher_host.h" | 76 #include "content/browser/quota_dispatcher_host.h" |
| 76 #include "content/browser/renderer_host/clipboard_message_filter.h" | 77 #include "content/browser/renderer_host/clipboard_message_filter.h" |
| 77 #include "content/browser/renderer_host/database_message_filter.h" | 78 #include "content/browser/renderer_host/database_message_filter.h" |
| 78 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 79 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
| 79 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" | 80 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 AddFilter(new MemoryBenchmarkMessageFilter()); | 872 AddFilter(new MemoryBenchmarkMessageFilter()); |
| 872 #endif | 873 #endif |
| 873 AddFilter(new VibrationMessageFilter()); | 874 AddFilter(new VibrationMessageFilter()); |
| 874 AddFilter(new PushMessagingMessageFilter( | 875 AddFilter(new PushMessagingMessageFilter( |
| 875 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 876 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
| 876 #if defined(OS_ANDROID) | 877 #if defined(OS_ANDROID) |
| 877 AddFilter(new ScreenOrientationMessageFilterAndroid()); | 878 AddFilter(new ScreenOrientationMessageFilterAndroid()); |
| 878 #endif | 879 #endif |
| 879 AddFilter(new GeofencingDispatcherHost( | 880 AddFilter(new GeofencingDispatcherHost( |
| 880 storage_partition_impl_->GetGeofencingManager())); | 881 storage_partition_impl_->GetGeofencingManager())); |
| 882 AddFilter(new NavigatorConnectDispatcherHost()); |
| 881 if (browser_command_line.HasSwitch( | 883 if (browser_command_line.HasSwitch( |
| 882 switches::kEnableExperimentalWebPlatformFeatures)) | 884 switches::kEnableExperimentalWebPlatformFeatures)) |
| 883 AddFilter(new BluetoothDispatcherHost()); | 885 AddFilter(new BluetoothDispatcherHost()); |
| 884 } | 886 } |
| 885 | 887 |
| 886 void RenderProcessHostImpl::RegisterMojoServices() { | 888 void RenderProcessHostImpl::RegisterMojoServices() { |
| 887 mojo_application_host_->service_registry()->AddService( | 889 mojo_application_host_->service_registry()->AddService( |
| 888 base::Bind(&device::BatteryMonitorImpl::Create)); | 890 base::Bind(&device::BatteryMonitorImpl::Create)); |
| 889 | 891 |
| 890 mojo_application_host_->service_registry()->AddService( | 892 mojo_application_host_->service_registry()->AddService( |
| (...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2280 | 2282 |
| 2281 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2283 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2282 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2284 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2283 DCHECK_GT(worker_ref_count_, 0); | 2285 DCHECK_GT(worker_ref_count_, 0); |
| 2284 --worker_ref_count_; | 2286 --worker_ref_count_; |
| 2285 if (worker_ref_count_ == 0) | 2287 if (worker_ref_count_ == 0) |
| 2286 Cleanup(); | 2288 Cleanup(); |
| 2287 } | 2289 } |
| 2288 | 2290 |
| 2289 } // namespace content | 2291 } // namespace content |
| OLD | NEW |