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

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

Issue 2077983003: Intiialize AudioManager and related class lazily (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply the lazy initialization only to Android Created 4 years, 6 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
OLDNEW
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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 // render process. This ensures that when a test is being run in one of the 594 // render process. This ensures that when a test is being run in one of the
595 // single process modes, the global attachment broker is the privileged 595 // single process modes, the global attachment broker is the privileged
596 // attachment broker, rather than an unprivileged attachment broker. 596 // attachment broker, rather than an unprivileged attachment broker.
597 #if defined(OS_MACOSX) 597 #if defined(OS_MACOSX)
598 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( 598 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(
599 MachBroker::GetInstance()); 599 MachBroker::GetInstance());
600 #else 600 #else
601 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); 601 IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded();
602 #endif // defined(OS_MACOSX) 602 #endif // defined(OS_MACOSX)
603 #endif // USE_ATTACHMENT_BROKER 603 #endif // USE_ATTACHMENT_BROKER
604 BrowserMainLoop::GetInstance()->InitializeMediaComponentsIfNeeded();
604 } 605 }
605 606
606 // static 607 // static
607 void RenderProcessHostImpl::ShutDownInProcessRenderer() { 608 void RenderProcessHostImpl::ShutDownInProcessRenderer() {
608 DCHECK(g_run_renderer_in_process_); 609 DCHECK(g_run_renderer_in_process_);
609 610
610 switch (g_all_hosts.Pointer()->size()) { 611 switch (g_all_hosts.Pointer()->size()) {
611 case 0: 612 case 0:
612 return; 613 return;
613 case 1: { 614 case 1: {
(...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after
2811 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 2812 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
2812 2813
2813 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias 2814 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias
2814 // enough information here so that we can determine what the bad message was. 2815 // enough information here so that we can determine what the bad message was.
2815 base::debug::Alias(&error); 2816 base::debug::Alias(&error);
2816 bad_message::ReceivedBadMessage(process.get(), 2817 bad_message::ReceivedBadMessage(process.get(),
2817 bad_message::RPH_MOJO_PROCESS_ERROR); 2818 bad_message::RPH_MOJO_PROCESS_ERROR);
2818 } 2819 }
2819 2820
2820 } // namespace content 2821 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698