| 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 #endif | 708 #endif |
| 709 #if defined(ENABLE_PLUGINS) | 709 #if defined(ENABLE_PLUGINS) |
| 710 AddFilter(new PepperRendererConnection(GetID())); | 710 AddFilter(new PepperRendererConnection(GetID())); |
| 711 #endif | 711 #endif |
| 712 #if defined(ENABLE_INPUT_SPEECH) | 712 #if defined(ENABLE_INPUT_SPEECH) |
| 713 AddFilter(new InputTagSpeechDispatcherHost( | 713 AddFilter(new InputTagSpeechDispatcherHost( |
| 714 IsGuest(), GetID(), storage_partition_impl_->GetURLRequestContext())); | 714 IsGuest(), GetID(), storage_partition_impl_->GetURLRequestContext())); |
| 715 #endif | 715 #endif |
| 716 AddFilter(new SpeechRecognitionDispatcherHost( | 716 AddFilter(new SpeechRecognitionDispatcherHost( |
| 717 IsGuest(), GetID(), storage_partition_impl_->GetURLRequestContext())); | 717 IsGuest(), GetID(), storage_partition_impl_->GetURLRequestContext())); |
| 718 AddFilter(new FileAPIMessageFilter( | 718 fileapi_message_filter_ = new FileAPIMessageFilter( |
| 719 GetID(), | 719 GetID(), |
| 720 storage_partition_impl_->GetURLRequestContext(), | 720 storage_partition_impl_->GetURLRequestContext(), |
| 721 storage_partition_impl_->GetFileSystemContext(), | 721 storage_partition_impl_->GetFileSystemContext(), |
| 722 ChromeBlobStorageContext::GetFor(browser_context), | 722 ChromeBlobStorageContext::GetFor(browser_context), |
| 723 StreamContext::GetFor(browser_context))); | 723 StreamContext::GetFor(browser_context)); |
| 724 AddFilter(fileapi_message_filter_); |
| 724 AddFilter(new FileUtilitiesMessageFilter(GetID())); | 725 AddFilter(new FileUtilitiesMessageFilter(GetID())); |
| 725 AddFilter(new MimeRegistryMessageFilter()); | 726 AddFilter(new MimeRegistryMessageFilter()); |
| 726 AddFilter(new DatabaseMessageFilter( | 727 AddFilter(new DatabaseMessageFilter( |
| 727 storage_partition_impl_->GetDatabaseTracker())); | 728 storage_partition_impl_->GetDatabaseTracker())); |
| 728 #if defined(OS_MACOSX) | 729 #if defined(OS_MACOSX) |
| 729 AddFilter(new TextInputClientMessageFilter(GetID())); | 730 AddFilter(new TextInputClientMessageFilter(GetID())); |
| 730 #elif defined(OS_WIN) | 731 #elif defined(OS_WIN) |
| 731 // The FontCacheDispatcher is required only when we're using GDI rendering. | 732 // The FontCacheDispatcher is required only when we're using GDI rendering. |
| 732 if (!ShouldUseDirectWrite()) | 733 if (!ShouldUseDirectWrite()) |
| 733 channel_->AddFilter(new FontCacheDispatcher()); | 734 channel_->AddFilter(new FontCacheDispatcher()); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 | 834 |
| 834 void RenderProcessHostImpl::ResumeDeferredNavigation( | 835 void RenderProcessHostImpl::ResumeDeferredNavigation( |
| 835 const GlobalRequestID& request_id) { | 836 const GlobalRequestID& request_id) { |
| 836 widget_helper_->ResumeDeferredNavigation(request_id); | 837 widget_helper_->ResumeDeferredNavigation(request_id); |
| 837 } | 838 } |
| 838 | 839 |
| 839 void RenderProcessHostImpl::NotifyTimezoneChange() { | 840 void RenderProcessHostImpl::NotifyTimezoneChange() { |
| 840 Send(new ViewMsg_TimezoneChange()); | 841 Send(new ViewMsg_TimezoneChange()); |
| 841 } | 842 } |
| 842 | 843 |
| 844 BlobStorageHost* RenderProcessHostImpl::GetBlobStorageHost() const { |
| 845 return fileapi_message_filter_->GetBlobStorageHost(); |
| 846 } |
| 847 |
| 843 void RenderProcessHostImpl::AddRoute( | 848 void RenderProcessHostImpl::AddRoute( |
| 844 int32 routing_id, | 849 int32 routing_id, |
| 845 IPC::Listener* listener) { | 850 IPC::Listener* listener) { |
| 846 listeners_.AddWithID(listener, routing_id); | 851 listeners_.AddWithID(listener, routing_id); |
| 847 } | 852 } |
| 848 | 853 |
| 849 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { | 854 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { |
| 850 DCHECK(listeners_.Lookup(routing_id) != NULL); | 855 DCHECK(listeners_.Lookup(routing_id) != NULL); |
| 851 listeners_.Remove(routing_id); | 856 listeners_.Remove(routing_id); |
| 852 | 857 |
| (...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2067 mojo::ScopedMessagePipeHandle handle) { | 2072 mojo::ScopedMessagePipeHandle handle) { |
| 2068 if (!mojo_application_host_->did_activate()) | 2073 if (!mojo_application_host_->did_activate()) |
| 2069 mojo_application_host_->Activate(this, GetHandle()); | 2074 mojo_application_host_->Activate(this, GetHandle()); |
| 2070 | 2075 |
| 2071 mojo::AllocationScope scope; | 2076 mojo::AllocationScope scope; |
| 2072 mojo_application_host_->shell_client()->AcceptConnection(service_name, | 2077 mojo_application_host_->shell_client()->AcceptConnection(service_name, |
| 2073 handle.Pass()); | 2078 handle.Pass()); |
| 2074 } | 2079 } |
| 2075 | 2080 |
| 2076 } // namespace content | 2081 } // namespace content |
| OLD | NEW |