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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 ResourceContext* resource_context = browser_context->GetResourceContext(); | 535 ResourceContext* resource_context = browser_context->GetResourceContext(); |
536 | 536 |
537 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( | 537 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( |
538 GetID(), PROCESS_TYPE_RENDERER, resource_context, | 538 GetID(), PROCESS_TYPE_RENDERER, resource_context, |
539 storage_partition_impl_->GetAppCacheService(), | 539 storage_partition_impl_->GetAppCacheService(), |
540 ChromeBlobStorageContext::GetFor(browser_context), | 540 ChromeBlobStorageContext::GetFor(browser_context), |
541 new RendererURLRequestContextSelector(browser_context, GetID())); | 541 new RendererURLRequestContextSelector(browser_context, GetID())); |
542 | 542 |
543 channel_->AddFilter(resource_message_filter); | 543 channel_->AddFilter(resource_message_filter); |
544 media::AudioManager* audio_manager = BrowserMainLoop::GetAudioManager(); | 544 media::AudioManager* audio_manager = BrowserMainLoop::GetAudioManager(); |
545 media_stream::MediaStreamManager* media_stream_manager = | 545 MediaStreamManager* media_stream_manager = |
546 BrowserMainLoop::GetMediaStreamManager(); | 546 BrowserMainLoop::GetMediaStreamManager(); |
547 channel_->AddFilter(new AudioInputRendererHost(audio_manager, | 547 channel_->AddFilter(new AudioInputRendererHost(audio_manager, |
548 media_stream_manager)); | 548 media_stream_manager)); |
549 channel_->AddFilter(new AudioRendererHost(audio_manager, media_observer)); | 549 channel_->AddFilter(new AudioRendererHost(audio_manager, media_observer)); |
550 channel_->AddFilter(new VideoCaptureHost()); | 550 channel_->AddFilter(new VideoCaptureHost()); |
551 channel_->AddFilter(new AppCacheDispatcherHost( | 551 channel_->AddFilter(new AppCacheDispatcherHost( |
552 storage_partition_impl_->GetAppCacheService(), | 552 storage_partition_impl_->GetAppCacheService(), |
553 GetID())); | 553 GetID())); |
554 channel_->AddFilter(new ClipboardMessageFilter()); | 554 channel_->AddFilter(new ClipboardMessageFilter()); |
555 channel_->AddFilter( | 555 channel_->AddFilter( |
556 new DOMStorageMessageFilter( | 556 new DOMStorageMessageFilter( |
557 GetID(), | 557 GetID(), |
558 storage_partition_impl_->GetDOMStorageContext())); | 558 storage_partition_impl_->GetDOMStorageContext())); |
559 channel_->AddFilter( | 559 channel_->AddFilter( |
560 new IndexedDBDispatcherHost( | 560 new IndexedDBDispatcherHost( |
561 GetID(), | 561 GetID(), |
562 storage_partition_impl_->GetIndexedDBContext())); | 562 storage_partition_impl_->GetIndexedDBContext())); |
563 channel_->AddFilter(GeolocationDispatcherHost::New( | 563 channel_->AddFilter(GeolocationDispatcherHost::New( |
564 GetID(), browser_context->GetGeolocationPermissionContext())); | 564 GetID(), browser_context->GetGeolocationPermissionContext())); |
565 gpu_message_filter_ = new GpuMessageFilter(GetID(), widget_helper_.get()); | 565 gpu_message_filter_ = new GpuMessageFilter(GetID(), widget_helper_.get()); |
566 channel_->AddFilter(gpu_message_filter_); | 566 channel_->AddFilter(gpu_message_filter_); |
567 #if defined(ENABLE_WEBRTC) | 567 #if defined(ENABLE_WEBRTC) |
568 channel_->AddFilter(new media_stream::MediaStreamDispatcherHost(GetID())); | 568 channel_->AddFilter(new MediaStreamDispatcherHost(GetID())); |
569 #endif | 569 #endif |
570 channel_->AddFilter( | 570 channel_->AddFilter( |
571 GetContentClient()->browser()->AllowPepperPrivateFileAPI() ? | 571 GetContentClient()->browser()->AllowPepperPrivateFileAPI() ? |
572 new PepperUnsafeFileMessageFilter( | 572 new PepperUnsafeFileMessageFilter( |
573 GetID(), | 573 GetID(), |
574 storage_partition_impl_->GetPath()) : | 574 storage_partition_impl_->GetPath()) : |
575 new PepperFileMessageFilter(GetID())); | 575 new PepperFileMessageFilter(GetID())); |
576 channel_->AddFilter(new PepperMessageFilter(PepperMessageFilter::RENDERER, | 576 channel_->AddFilter(new PepperMessageFilter(PepperMessageFilter::RENDERER, |
577 GetID(), browser_context)); | 577 GetID(), browser_context)); |
578 #if defined(ENABLE_INPUT_SPEECH) | 578 #if defined(ENABLE_INPUT_SPEECH) |
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1593 int32 gpu_process_host_id) { | 1593 int32 gpu_process_host_id) { |
1594 TRACE_EVENT0("renderer_host", | 1594 TRACE_EVENT0("renderer_host", |
1595 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); | 1595 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); |
1596 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, | 1596 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, |
1597 gpu_process_host_id, | 1597 gpu_process_host_id, |
1598 false, | 1598 false, |
1599 0); | 1599 0); |
1600 } | 1600 } |
1601 | 1601 |
1602 } // namespace content | 1602 } // namespace content |
OLD | NEW |