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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 72203003: Introduce RenderProcessHostObserver, use it in its first client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 1 month 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 20 matching lines...) Expand all
31 #include "content/browser/gpu/compositor_util.h" 31 #include "content/browser/gpu/compositor_util.h"
32 #include "content/browser/gpu/gpu_data_manager_impl.h" 32 #include "content/browser/gpu/gpu_data_manager_impl.h"
33 #include "content/browser/gpu/gpu_process_host.h" 33 #include "content/browser/gpu/gpu_process_host.h"
34 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 34 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
35 #include "content/browser/histogram_synchronizer.h" 35 #include "content/browser/histogram_synchronizer.h"
36 #include "content/browser/loader/resource_dispatcher_host_impl.h" 36 #include "content/browser/loader/resource_dispatcher_host_impl.h"
37 #include "content/browser/net/browser_online_state_observer.h" 37 #include "content/browser/net/browser_online_state_observer.h"
38 #include "content/browser/plugin_service_impl.h" 38 #include "content/browser/plugin_service_impl.h"
39 #include "content/browser/renderer_host/media/audio_mirroring_manager.h" 39 #include "content/browser/renderer_host/media/audio_mirroring_manager.h"
40 #include "content/browser/renderer_host/media/media_stream_manager.h" 40 #include "content/browser/renderer_host/media/media_stream_manager.h"
41 #include "content/browser/renderer_host/render_process_host_impl.h"
41 #include "content/browser/speech/speech_recognition_manager_impl.h" 42 #include "content/browser/speech/speech_recognition_manager_impl.h"
42 #include "content/browser/startup_task_runner.h" 43 #include "content/browser/startup_task_runner.h"
43 #include "content/browser/tracing/trace_controller_impl.h" 44 #include "content/browser/tracing/trace_controller_impl.h"
44 #include "content/browser/webui/content_web_ui_controller_factory.h" 45 #include "content/browser/webui/content_web_ui_controller_factory.h"
45 #include "content/browser/webui/url_data_manager.h" 46 #include "content/browser/webui/url_data_manager.h"
46 #include "content/public/browser/browser_main_parts.h" 47 #include "content/public/browser/browser_main_parts.h"
47 #include "content/public/browser/browser_shutdown.h" 48 #include "content/public/browser/browser_shutdown.h"
48 #include "content/public/browser/content_browser_client.h" 49 #include "content/public/browser/content_browser_client.h"
49 #include "content/public/browser/render_process_host.h" 50 #include "content/public/browser/render_process_host.h"
50 #include "content/public/common/content_switches.h" 51 #include "content/public/common/content_switches.h"
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 TRACE_EVENT0("shutdown", "BrowserMainLoop::ShutdownThreadsAndCleanUp") 734 TRACE_EVENT0("shutdown", "BrowserMainLoop::ShutdownThreadsAndCleanUp")
734 735
735 // Teardown may start in PostMainMessageLoopRun, and during teardown we 736 // Teardown may start in PostMainMessageLoopRun, and during teardown we
736 // need to be able to perform IO. 737 // need to be able to perform IO.
737 base::ThreadRestrictions::SetIOAllowed(true); 738 base::ThreadRestrictions::SetIOAllowed(true);
738 BrowserThread::PostTask( 739 BrowserThread::PostTask(
739 BrowserThread::IO, FROM_HERE, 740 BrowserThread::IO, FROM_HERE,
740 base::Bind(base::IgnoreResult(&base::ThreadRestrictions::SetIOAllowed), 741 base::Bind(base::IgnoreResult(&base::ThreadRestrictions::SetIOAllowed),
741 true)); 742 true));
742 743
743 if (RenderProcessHost::run_renderer_in_process() && 744 if (RenderProcessHost::run_renderer_in_process())
744 !RenderProcessHost::AllHostsIterator().IsAtEnd()) { 745 RenderProcessHostImpl::ShutDownInProcessRenderer();
745 delete RenderProcessHost::AllHostsIterator().GetCurrentValue();
746 }
747 746
748 if (parts_) { 747 if (parts_) {
749 TRACE_EVENT0("shutdown", 748 TRACE_EVENT0("shutdown",
750 "BrowserMainLoop::Subsystem:PostMainMessageLoopRun"); 749 "BrowserMainLoop::Subsystem:PostMainMessageLoopRun");
751 parts_->PostMainMessageLoopRun(); 750 parts_->PostMainMessageLoopRun();
752 } 751 }
753 752
754 trace_memory_controller_.reset(); 753 trace_memory_controller_.reset();
755 system_stats_monitor_.reset(); 754 system_stats_monitor_.reset();
756 755
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 if (parameters_.ui_task) 1068 if (parameters_.ui_task)
1070 base::MessageLoopForUI::current()->PostTask(FROM_HERE, 1069 base::MessageLoopForUI::current()->PostTask(FROM_HERE,
1071 *parameters_.ui_task); 1070 *parameters_.ui_task);
1072 1071
1073 base::RunLoop run_loop; 1072 base::RunLoop run_loop;
1074 run_loop.Run(); 1073 run_loop.Run();
1075 #endif 1074 #endif
1076 } 1075 }
1077 1076
1078 } // namespace content 1077 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698