OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 // render process. This ensures that when a test is being run in one of the | 588 // render process. This ensures that when a test is being run in one of the |
589 // single process modes, the global attachment broker is the privileged | 589 // single process modes, the global attachment broker is the privileged |
590 // attachment broker, rather than an unprivileged attachment broker. | 590 // attachment broker, rather than an unprivileged attachment broker. |
591 #if defined(OS_MACOSX) | 591 #if defined(OS_MACOSX) |
592 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( | 592 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( |
593 MachBroker::GetInstance()); | 593 MachBroker::GetInstance()); |
594 #else | 594 #else |
595 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); | 595 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); |
596 #endif // defined(OS_MACOSX) | 596 #endif // defined(OS_MACOSX) |
597 #endif // USE_ATTACHMENT_BROKER | 597 #endif // USE_ATTACHMENT_BROKER |
| 598 MediaInternals* media_internals = MediaInternals::GetInstance(); |
| 599 |
| 600 media::AudioManager* audio_manager = |
| 601 BrowserMainLoop::GetInstance()->audio_manager(); |
| 602 |
| 603 MediaStreamManager* media_stream_manager = |
| 604 BrowserMainLoop::GetInstance()->media_stream_manager(); |
| 605 audio_renderer_host_ = new AudioRendererHost( |
| 606 GetID(), audio_manager, AudioMirroringManager::GetInstance(), |
| 607 media_internals, media_stream_manager, |
| 608 browser_context->GetResourceContext()->GetMediaDeviceIDSalt()); |
598 } | 609 } |
599 | 610 |
600 // static | 611 // static |
601 void RenderProcessHostImpl::ShutDownInProcessRenderer() { | 612 void RenderProcessHostImpl::ShutDownInProcessRenderer() { |
602 DCHECK(g_run_renderer_in_process_); | 613 DCHECK(g_run_renderer_in_process_); |
603 | 614 |
604 switch (g_all_hosts.Pointer()->size()) { | 615 switch (g_all_hosts.Pointer()->size()) { |
605 case 0: | 616 case 0: |
606 return; | 617 return; |
607 case 1: { | 618 case 1: { |
(...skipping 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2765 | 2776 |
2766 // Skip widgets in other processes. | 2777 // Skip widgets in other processes. |
2767 if (rvh->GetProcess()->GetID() != GetID()) | 2778 if (rvh->GetProcess()->GetID() != GetID()) |
2768 continue; | 2779 continue; |
2769 | 2780 |
2770 rvh->OnWebkitPreferencesChanged(); | 2781 rvh->OnWebkitPreferencesChanged(); |
2771 } | 2782 } |
2772 } | 2783 } |
2773 | 2784 |
2774 } // namespace content | 2785 } // namespace content |
OLD | NEW |