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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 12153002: Move chrome://media-internals to content. This allows us to hide implementation details from the pu… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "content/browser/fileapi/chrome_blob_storage_context.h" 50 #include "content/browser/fileapi/chrome_blob_storage_context.h"
51 #include "content/browser/fileapi/fileapi_message_filter.h" 51 #include "content/browser/fileapi/fileapi_message_filter.h"
52 #include "content/browser/geolocation/geolocation_dispatcher_host.h" 52 #include "content/browser/geolocation/geolocation_dispatcher_host.h"
53 #include "content/browser/gpu/gpu_data_manager_impl.h" 53 #include "content/browser/gpu/gpu_data_manager_impl.h"
54 #include "content/browser/gpu/gpu_process_host.h" 54 #include "content/browser/gpu/gpu_process_host.h"
55 #include "content/browser/histogram_message_filter.h" 55 #include "content/browser/histogram_message_filter.h"
56 #include "content/browser/hyphenator/hyphenator_message_filter.h" 56 #include "content/browser/hyphenator/hyphenator_message_filter.h"
57 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" 57 #include "content/browser/in_process_webkit/indexed_db_context_impl.h"
58 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" 58 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h"
59 #include "content/browser/loader/resource_message_filter.h" 59 #include "content/browser/loader/resource_message_filter.h"
60 #include "content/browser/media/media_internals.h"
60 #include "content/browser/mime_registry_message_filter.h" 61 #include "content/browser/mime_registry_message_filter.h"
61 #include "content/browser/plugin_service_impl.h" 62 #include "content/browser/plugin_service_impl.h"
62 #include "content/browser/profiler_message_filter.h" 63 #include "content/browser/profiler_message_filter.h"
63 #include "content/browser/renderer_host/clipboard_message_filter.h" 64 #include "content/browser/renderer_host/clipboard_message_filter.h"
64 #include "content/browser/renderer_host/database_message_filter.h" 65 #include "content/browser/renderer_host/database_message_filter.h"
65 #include "content/browser/renderer_host/file_utilities_message_filter.h" 66 #include "content/browser/renderer_host/file_utilities_message_filter.h"
66 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" 67 #include "content/browser/renderer_host/gamepad_browser_message_filter.h"
67 #include "content/browser/renderer_host/gpu_message_filter.h" 68 #include "content/browser/renderer_host/gpu_message_filter.h"
68 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" 69 #include "content/browser/renderer_host/media/audio_input_renderer_host.h"
69 #include "content/browser/renderer_host/media/audio_mirroring_manager.h" 70 #include "content/browser/renderer_host/media/audio_mirroring_manager.h"
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 475
475 fast_shutdown_started_ = false; 476 fast_shutdown_started_ = false;
476 } 477 }
477 478
478 is_initialized_ = true; 479 is_initialized_ = true;
479 return true; 480 return true;
480 } 481 }
481 482
482 void RenderProcessHostImpl::CreateMessageFilters() { 483 void RenderProcessHostImpl::CreateMessageFilters() {
483 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 484 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
484 MediaObserver* media_observer = 485 MediaInternals* media_internals = MediaInternals::GetInstance();;
485 GetContentClient()->browser()->GetMediaObserver();
486 // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages 486 // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
487 // from guests. 487 // from guests.
488 if (IsGuest()) { 488 if (IsGuest()) {
489 scoped_refptr<BrowserPluginMessageFilter> bp_message_filter( 489 scoped_refptr<BrowserPluginMessageFilter> bp_message_filter(
490 new BrowserPluginMessageFilter( 490 new BrowserPluginMessageFilter(
491 GetID(), 491 GetID(),
492 GetBrowserContext())); 492 GetBrowserContext()));
493 channel_->AddFilter(bp_message_filter); 493 channel_->AddFilter(bp_message_filter);
494 } 494 }
495 495
496 scoped_refptr<RenderMessageFilter> render_message_filter( 496 scoped_refptr<RenderMessageFilter> render_message_filter(
497 new RenderMessageFilter( 497 new RenderMessageFilter(
498 GetID(), 498 GetID(),
499 #if defined(ENABLE_PLUGINS) 499 #if defined(ENABLE_PLUGINS)
500 PluginServiceImpl::GetInstance(), 500 PluginServiceImpl::GetInstance(),
501 #else 501 #else
502 NULL, 502 NULL,
503 #endif 503 #endif
504 GetBrowserContext(), 504 GetBrowserContext(),
505 GetBrowserContext()->GetRequestContextForRenderProcess(GetID()), 505 GetBrowserContext()->GetRequestContextForRenderProcess(GetID()),
506 widget_helper_, 506 widget_helper_,
507 media_observer, 507 media_internals,
508 storage_partition_impl_->GetDOMStorageContext())); 508 storage_partition_impl_->GetDOMStorageContext()));
509 channel_->AddFilter(render_message_filter); 509 channel_->AddFilter(render_message_filter);
510 BrowserContext* browser_context = GetBrowserContext(); 510 BrowserContext* browser_context = GetBrowserContext();
511 ResourceContext* resource_context = browser_context->GetResourceContext(); 511 ResourceContext* resource_context = browser_context->GetResourceContext();
512 512
513 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( 513 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter(
514 GetID(), PROCESS_TYPE_RENDERER, resource_context, 514 GetID(), PROCESS_TYPE_RENDERER, resource_context,
515 storage_partition_impl_->GetAppCacheService(), 515 storage_partition_impl_->GetAppCacheService(),
516 ChromeBlobStorageContext::GetFor(browser_context), 516 ChromeBlobStorageContext::GetFor(browser_context),
517 storage_partition_impl_->GetFileSystemContext(), 517 storage_partition_impl_->GetFileSystemContext(),
518 new RendererURLRequestContextSelector(browser_context, GetID())); 518 new RendererURLRequestContextSelector(browser_context, GetID()));
519 519
520 channel_->AddFilter(resource_message_filter); 520 channel_->AddFilter(resource_message_filter);
521 media::AudioManager* audio_manager = BrowserMainLoop::GetAudioManager(); 521 media::AudioManager* audio_manager = BrowserMainLoop::GetAudioManager();
522 MediaStreamManager* media_stream_manager = 522 MediaStreamManager* media_stream_manager =
523 BrowserMainLoop::GetMediaStreamManager(); 523 BrowserMainLoop::GetMediaStreamManager();
524 channel_->AddFilter(new AudioInputRendererHost(audio_manager, 524 channel_->AddFilter(new AudioInputRendererHost(audio_manager,
525 media_stream_manager)); 525 media_stream_manager));
526 channel_->AddFilter(new AudioRendererHost( 526 channel_->AddFilter(new AudioRendererHost(
527 GetID(), audio_manager, BrowserMainLoop::GetAudioMirroringManager(), 527 GetID(), audio_manager, BrowserMainLoop::GetAudioMirroringManager(),
528 media_observer)); 528 media_internals));
529 channel_->AddFilter(new VideoCaptureHost()); 529 channel_->AddFilter(new VideoCaptureHost());
530 channel_->AddFilter(new AppCacheDispatcherHost( 530 channel_->AddFilter(new AppCacheDispatcherHost(
531 storage_partition_impl_->GetAppCacheService(), 531 storage_partition_impl_->GetAppCacheService(),
532 GetID())); 532 GetID()));
533 channel_->AddFilter(new ClipboardMessageFilter()); 533 channel_->AddFilter(new ClipboardMessageFilter());
534 channel_->AddFilter( 534 channel_->AddFilter(
535 new DOMStorageMessageFilter( 535 new DOMStorageMessageFilter(
536 GetID(), 536 GetID(),
537 storage_partition_impl_->GetDOMStorageContext())); 537 storage_partition_impl_->GetDOMStorageContext()));
538 channel_->AddFilter( 538 channel_->AddFilter(
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 TRACE_EVENT0("renderer_host", 1611 TRACE_EVENT0("renderer_host",
1612 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); 1612 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost");
1613 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; 1613 AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
1614 ack_params.sync_point = 0; 1614 ack_params.sync_point = 0;
1615 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, 1615 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
1616 gpu_process_host_id, 1616 gpu_process_host_id,
1617 ack_params); 1617 ack_params);
1618 } 1618 }
1619 1619
1620 } // namespace content 1620 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698