| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 44 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
| 45 #include "content/browser/child_process_security_policy_impl.h" | 45 #include "content/browser/child_process_security_policy_impl.h" |
| 46 #include "content/browser/device_orientation/device_motion_message_filter.h" | 46 #include "content/browser/device_orientation/device_motion_message_filter.h" |
| 47 #include "content/browser/device_orientation/device_orientation_message_filter.h
" | 47 #include "content/browser/device_orientation/device_orientation_message_filter.h
" |
| 48 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 48 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 49 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 49 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
| 50 #include "content/browser/download/mhtml_generation_manager.h" | 50 #include "content/browser/download/mhtml_generation_manager.h" |
| 51 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 51 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
| 52 #include "content/browser/fileapi/fileapi_message_filter.h" | 52 #include "content/browser/fileapi/fileapi_message_filter.h" |
| 53 #include "content/browser/frame_host/render_frame_message_filter.h" | 53 #include "content/browser/frame_host/render_frame_message_filter.h" |
| 54 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | |
| 55 #include "content/browser/gpu/compositor_util.h" | 54 #include "content/browser/gpu/compositor_util.h" |
| 56 #include "content/browser/gpu/gpu_data_manager_impl.h" | 55 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 57 #include "content/browser/gpu/gpu_process_host.h" | 56 #include "content/browser/gpu/gpu_process_host.h" |
| 58 #include "content/browser/gpu/shader_disk_cache.h" | 57 #include "content/browser/gpu/shader_disk_cache.h" |
| 59 #include "content/browser/histogram_message_filter.h" | 58 #include "content/browser/histogram_message_filter.h" |
| 60 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 59 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
| 61 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 60 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
| 62 #include "content/browser/loader/resource_message_filter.h" | 61 #include "content/browser/loader/resource_message_filter.h" |
| 63 #include "content/browser/loader/resource_scheduler_filter.h" | 62 #include "content/browser/loader/resource_scheduler_filter.h" |
| 64 #include "content/browser/media/android/browser_demuxer_android.h" | 63 #include "content/browser/media/android/browser_demuxer_android.h" |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 GetID())); | 607 GetID())); |
| 609 AddFilter(new ClipboardMessageFilter); | 608 AddFilter(new ClipboardMessageFilter); |
| 610 AddFilter(new DOMStorageMessageFilter( | 609 AddFilter(new DOMStorageMessageFilter( |
| 611 GetID(), | 610 GetID(), |
| 612 storage_partition_impl_->GetDOMStorageContext())); | 611 storage_partition_impl_->GetDOMStorageContext())); |
| 613 AddFilter(new IndexedDBDispatcherHost( | 612 AddFilter(new IndexedDBDispatcherHost( |
| 614 GetID(), | 613 GetID(), |
| 615 storage_partition_impl_->GetIndexedDBContext())); | 614 storage_partition_impl_->GetIndexedDBContext())); |
| 616 AddFilter(new ServiceWorkerDispatcherHost( | 615 AddFilter(new ServiceWorkerDispatcherHost( |
| 617 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 616 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
| 617 geolocation_dispatcher_host_ = NULL; |
| 618 if (IsGuest()) { | 618 if (IsGuest()) { |
| 619 if (!g_browser_plugin_geolocation_context.Get().get()) { | 619 if (!g_browser_plugin_geolocation_context.Get().get()) { |
| 620 g_browser_plugin_geolocation_context.Get() = | 620 g_browser_plugin_geolocation_context.Get() = |
| 621 new BrowserPluginGeolocationPermissionContext(); | 621 new BrowserPluginGeolocationPermissionContext(); |
| 622 } | 622 } |
| 623 AddFilter(GeolocationDispatcherHost::New( | 623 geolocation_dispatcher_host_ = GeolocationDispatcherHost::New( |
| 624 GetID(), g_browser_plugin_geolocation_context.Get().get())); | 624 GetID(), g_browser_plugin_geolocation_context.Get().get()); |
| 625 } else { | 625 } else { |
| 626 AddFilter(GeolocationDispatcherHost::New( | 626 geolocation_dispatcher_host_ = GeolocationDispatcherHost::New( |
| 627 GetID(), browser_context->GetGeolocationPermissionContext())); | 627 GetID(), browser_context->GetGeolocationPermissionContext()); |
| 628 } | 628 } |
| 629 AddFilter(geolocation_dispatcher_host_); |
| 629 gpu_message_filter_ = new GpuMessageFilter(GetID(), widget_helper_.get()); | 630 gpu_message_filter_ = new GpuMessageFilter(GetID(), widget_helper_.get()); |
| 630 AddFilter(gpu_message_filter_); | 631 AddFilter(gpu_message_filter_); |
| 631 #if defined(ENABLE_WEBRTC) | 632 #if defined(ENABLE_WEBRTC) |
| 632 AddFilter(new WebRTCIdentityServiceHost( | 633 AddFilter(new WebRTCIdentityServiceHost( |
| 633 GetID(), storage_partition_impl_->GetWebRTCIdentityStore())); | 634 GetID(), storage_partition_impl_->GetWebRTCIdentityStore())); |
| 634 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); | 635 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); |
| 635 AddFilter(peer_connection_tracker_host_.get()); | 636 AddFilter(peer_connection_tracker_host_.get()); |
| 636 AddFilter(new MediaStreamDispatcherHost( | 637 AddFilter(new MediaStreamDispatcherHost( |
| 637 GetID(), media_stream_manager)); | 638 GetID(), media_stream_manager)); |
| 638 AddFilter( | 639 AddFilter( |
| (...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 // Skip widgets in other processes. | 1835 // Skip widgets in other processes. |
| 1835 if (widget->GetProcess()->GetID() != GetID()) | 1836 if (widget->GetProcess()->GetID() != GetID()) |
| 1836 continue; | 1837 continue; |
| 1837 | 1838 |
| 1838 RenderViewHost* rvh = RenderViewHost::From(widget); | 1839 RenderViewHost* rvh = RenderViewHost::From(widget); |
| 1839 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1840 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
| 1840 } | 1841 } |
| 1841 } | 1842 } |
| 1842 | 1843 |
| 1843 } // namespace content | 1844 } // namespace content |
| OLD | NEW |