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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 22944002: Implementation of the "Redirect URLs to Packaged Apps" feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 1) Fixed broken redirection for in-page WebKit-initiated navigations. All redirections work now. 2)… Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 7a05a6572136715c049360ceede9deee2dd384ed..50d791c9404a3b80a0f0349a4f46c72b971fe7dd 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -66,6 +66,7 @@
#include "content/browser/profiler_message_filter.h"
#include "content/browser/renderer_host/clipboard_message_filter.h"
#include "content/browser/renderer_host/database_message_filter.h"
+#include "content/browser/renderer_host/extension_system_message_filter.h"
#include "content/browser/renderer_host/file_utilities_message_filter.h"
#include "content/browser/renderer_host/gamepad_browser_message_filter.h"
#include "content/browser/renderer_host/gpu_message_filter.h"
@@ -108,6 +109,7 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/extension_system_messages.h"
#include "content/public/common/process_type.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/url_constants.h"
@@ -541,8 +543,12 @@ bool RenderProcessHostImpl::Init() {
void RenderProcessHostImpl::CreateMessageFilters() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+ // ResourceSchedulerFilter
Charlie Reis 2013/08/26 22:17:52 My sense is that these comments aren't really addi
sergeygs 2013/08/29 08:24:42 I'd say that it was rather hard to quickly enumera
channel_->AddFilter(new ResourceSchedulerFilter(GetID()));
- MediaInternals* media_internals = MediaInternals::GetInstance();;
+
+ MediaInternals* media_internals = MediaInternals::GetInstance();
+
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
// from guests.
if (supports_browser_plugin_) {
@@ -551,6 +557,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
channel_->AddFilter(bp_message_filter);
}
+ // RenderMessageFilter
scoped_refptr<RenderMessageFilter> render_message_filter(
new RenderMessageFilter(
GetID(),
@@ -565,17 +572,20 @@ void RenderProcessHostImpl::CreateMessageFilters() {
media_internals,
storage_partition_impl_->GetDOMStorageContext()));
channel_->AddFilter(render_message_filter);
+
BrowserContext* browser_context = GetBrowserContext();
- ResourceContext* resource_context = browser_context->GetResourceContext();
+ // ResourceMessageFilter
+ ResourceContext* resource_context = browser_context->GetResourceContext();
ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter(
GetID(), PROCESS_TYPE_RENDERER, resource_context,
storage_partition_impl_->GetAppCacheService(),
ChromeBlobStorageContext::GetFor(browser_context),
storage_partition_impl_->GetFileSystemContext(),
new RendererURLRequestContextSelector(browser_context, GetID()));
-
channel_->AddFilter(resource_message_filter);
+
+ // AudioInputRendererHost and AudioRendererHost
media::AudioManager* audio_manager = BrowserMainLoop::GetAudioManager();
MediaStreamManager* media_stream_manager =
BrowserMainLoop::GetMediaStreamManager();
@@ -584,19 +594,31 @@ void RenderProcessHostImpl::CreateMessageFilters() {
channel_->AddFilter(new AudioRendererHost(
GetID(), audio_manager, BrowserMainLoop::GetAudioMirroringManager(),
media_internals));
+
+ // VideoCaptureHost
channel_->AddFilter(new VideoCaptureHost());
+
+ // AppCacheDispatcherHost
channel_->AddFilter(new AppCacheDispatcherHost(
storage_partition_impl_->GetAppCacheService(),
GetID()));
+
+ // ClipboardMessageFilter
channel_->AddFilter(new ClipboardMessageFilter(browser_context));
+
+ // DOMStorageMessageFilter
channel_->AddFilter(
new DOMStorageMessageFilter(
GetID(),
storage_partition_impl_->GetDOMStorageContext()));
+
+ // IndexedDBDispatcherHost
channel_->AddFilter(
new IndexedDBDispatcherHost(
GetID(),
storage_partition_impl_->GetIndexedDBContext()));
+
+ // GeolocationDispatcherHost
if (IsGuest()) {
if (!g_browser_plugin_geolocation_context.Get()) {
g_browser_plugin_geolocation_context.Get() =
@@ -608,17 +630,25 @@ void RenderProcessHostImpl::CreateMessageFilters() {
channel_->AddFilter(GeolocationDispatcherHost::New(
GetID(), browser_context->GetGeolocationPermissionContext()));
}
+
+ // GpuMessageFilter
gpu_message_filter_ = new GpuMessageFilter(GetID(), widget_helper_.get());
channel_->AddFilter(gpu_message_filter_);
+
#if defined(ENABLE_WEBRTC)
+ // PeerConnectionTrackerHost
peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID());
channel_->AddFilter(peer_connection_tracker_host_);
+
+ // MediaStreamDispatcherHost
channel_->AddFilter(new MediaStreamDispatcherHost(GetID()));
#endif
#if defined(ENABLE_PLUGINS)
+ // PepperMessageFilter
channel_->AddFilter(new PepperMessageFilter(GetID(), browser_context));
#endif
#if defined(ENABLE_INPUT_SPEECH)
+ // InputTagSpeechDispatcherHost and SpeechRecognitionDispatcherHost
channel_->AddFilter(new InputTagSpeechDispatcherHost(
IsGuest(), GetID(), storage_partition_impl_->GetURLRequestContext(),
browser_context->GetSpeechRecognitionPreferences()));
@@ -626,28 +656,43 @@ void RenderProcessHostImpl::CreateMessageFilters() {
GetID(), storage_partition_impl_->GetURLRequestContext(),
browser_context->GetSpeechRecognitionPreferences()));
#endif
+
+ // FileAPIMessageFilter
channel_->AddFilter(new FileAPIMessageFilter(
GetID(),
storage_partition_impl_->GetURLRequestContext(),
storage_partition_impl_->GetFileSystemContext(),
ChromeBlobStorageContext::GetFor(browser_context)));
+
+ // OrientationMessageFilter
channel_->AddFilter(new OrientationMessageFilter());
+
+ // FileUtilitiesMessageFilter
channel_->AddFilter(new FileUtilitiesMessageFilter(GetID()));
+
+ // MimeRegistryMessageFilter
channel_->AddFilter(new MimeRegistryMessageFilter());
+
+ // DatabaseMessageFilter
channel_->AddFilter(new DatabaseMessageFilter(
storage_partition_impl_->GetDatabaseTracker()));
+
#if defined(OS_MACOSX)
+ // TextInputClientMessageFilter
channel_->AddFilter(new TextInputClientMessageFilter(GetID()));
#elif defined(OS_WIN)
+ // FontCacheDispatcher
channel_->AddFilter(new FontCacheDispatcher());
#endif
+ // SocketStreamDispatcherHost
SocketStreamDispatcherHost* socket_stream_dispatcher_host =
new SocketStreamDispatcherHost(GetID(),
new RendererURLRequestContextSelector(browser_context, GetID()),
resource_context);
channel_->AddFilter(socket_stream_dispatcher_host);
+ // WorkerMessageFilter
channel_->AddFilter(
new WorkerMessageFilter(
GetID(),
@@ -667,20 +712,37 @@ void RenderProcessHostImpl::CreateMessageFilters() {
channel_->AddFilter(new P2PSocketDispatcherHost(resource_context));
#endif
+ // TraceMessageFilter
channel_->AddFilter(new TraceMessageFilter());
+
+ // ResolveProxyMsgHelper
channel_->AddFilter(new ResolveProxyMsgHelper(
browser_context->GetRequestContextForRenderProcess(GetID())));
+
+ // QuotaDispatcherHost
channel_->AddFilter(new QuotaDispatcherHost(
GetID(),
storage_partition_impl_->GetQuotaManager(),
GetContentClient()->browser()->CreateQuotaPermissionContext()));
+
+ // QuotaDispatcherHost
channel_->AddFilter(new GamepadBrowserMessageFilter());
+
+ // ProfilerMessageFilter
channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER));
+
+ // HistogramMessageFilter
channel_->AddFilter(new HistogramMessageFilter());
+
+ // HyphenatorMessageFilter
channel_->AddFilter(new HyphenatorMessageFilter(this));
+
#if defined(ENABLE_WEBRTC)
+ // WebRtcLoggingHandlerHost
channel_->AddFilter(new WebRtcLoggingHandlerHost());
#endif
+
+ channel_->AddFilter(new ExtensionSystemMessageFilter(this));
}
int RenderProcessHostImpl::GetNextRoutingID() {

Powered by Google App Engine
This is Rietveld 408576698