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 #include "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #include "content/browser/leveldb_wrapper_impl.h" | 66 #include "content/browser/leveldb_wrapper_impl.h" |
67 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 67 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
68 #include "content/browser/loader_delegate_impl.h" | 68 #include "content/browser/loader_delegate_impl.h" |
69 #include "content/browser/media/media_internals.h" | 69 #include "content/browser/media/media_internals.h" |
70 #include "content/browser/memory/memory_coordinator_impl.h" | 70 #include "content/browser/memory/memory_coordinator_impl.h" |
71 #include "content/browser/memory/swap_metrics_observer.h" | 71 #include "content/browser/memory/swap_metrics_observer.h" |
72 #include "content/browser/net/browser_online_state_observer.h" | 72 #include "content/browser/net/browser_online_state_observer.h" |
73 #include "content/browser/renderer_host/media/media_stream_manager.h" | 73 #include "content/browser/renderer_host/media/media_stream_manager.h" |
74 #include "content/browser/renderer_host/render_process_host_impl.h" | 74 #include "content/browser/renderer_host/render_process_host_impl.h" |
75 #include "content/browser/service_manager/service_manager_context.h" | 75 #include "content/browser/service_manager/service_manager_context.h" |
| 76 #include "content/browser/site_instance_impl.h" |
76 #include "content/browser/speech/speech_recognition_manager_impl.h" | 77 #include "content/browser/speech/speech_recognition_manager_impl.h" |
77 #include "content/browser/startup_task_runner.h" | 78 #include "content/browser/startup_task_runner.h" |
78 #include "content/browser/utility_process_host_impl.h" | 79 #include "content/browser/utility_process_host_impl.h" |
79 #include "content/browser/webui/content_web_ui_controller_factory.h" | 80 #include "content/browser/webui/content_web_ui_controller_factory.h" |
80 #include "content/browser/webui/url_data_manager.h" | 81 #include "content/browser/webui/url_data_manager.h" |
81 #include "content/common/content_switches_internal.h" | 82 #include "content/common/content_switches_internal.h" |
82 #include "content/common/service_manager/service_manager_connection_impl.h" | 83 #include "content/common/service_manager/service_manager_connection_impl.h" |
83 #include "content/public/browser/browser_main_parts.h" | 84 #include "content/public/browser/browser_main_parts.h" |
84 #include "content/public/browser/content_browser_client.h" | 85 #include "content/public/browser/content_browser_client.h" |
85 #include "content/public/browser/gpu_data_manager_observer.h" | 86 #include "content/public/browser/gpu_data_manager_observer.h" |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 | 622 |
622 if (parsed_command_line_.HasSwitch(switches::kRendererProcessLimit)) { | 623 if (parsed_command_line_.HasSwitch(switches::kRendererProcessLimit)) { |
623 std::string limit_string = parsed_command_line_.GetSwitchValueASCII( | 624 std::string limit_string = parsed_command_line_.GetSwitchValueASCII( |
624 switches::kRendererProcessLimit); | 625 switches::kRendererProcessLimit); |
625 size_t process_limit; | 626 size_t process_limit; |
626 if (base::StringToSizeT(limit_string, &process_limit)) { | 627 if (base::StringToSizeT(limit_string, &process_limit)) { |
627 RenderProcessHost::SetMaxRendererProcessCount(process_limit); | 628 RenderProcessHost::SetMaxRendererProcessCount(process_limit); |
628 } | 629 } |
629 } | 630 } |
630 | 631 |
| 632 if (parsed_command_line_.HasSwitch(switches::kIsolateOrigins)) { |
| 633 SiteInstanceImpl::AddIsolatedOriginsFromCommandLine( |
| 634 parsed_command_line_.GetSwitchValueASCII(switches::kIsolateOrigins)); |
| 635 } |
| 636 |
631 if (parts_) | 637 if (parts_) |
632 parts_->PostEarlyInitialization(); | 638 parts_->PostEarlyInitialization(); |
633 } | 639 } |
634 | 640 |
635 void BrowserMainLoop::PreMainMessageLoopStart() { | 641 void BrowserMainLoop::PreMainMessageLoopStart() { |
636 if (parts_) { | 642 if (parts_) { |
637 TRACE_EVENT0("startup", | 643 TRACE_EVENT0("startup", |
638 "BrowserMainLoop::MainMessageLoopStart:PreMainMessageLoopStart"); | 644 "BrowserMainLoop::MainMessageLoopStart:PreMainMessageLoopStart"); |
639 parts_->PreMainMessageLoopStart(); | 645 parts_->PreMainMessageLoopStart(); |
640 } | 646 } |
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1768 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), | 1774 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
1769 MediaInternals::GetInstance()); | 1775 MediaInternals::GetInstance()); |
1770 } | 1776 } |
1771 CHECK(audio_manager_); | 1777 CHECK(audio_manager_); |
1772 | 1778 |
1773 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1779 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
1774 CHECK(audio_system_); | 1780 CHECK(audio_system_); |
1775 } | 1781 } |
1776 | 1782 |
1777 } // namespace content | 1783 } // namespace content |
OLD | NEW |