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/histogram_synchronizer.h" | 66 #include "content/browser/histogram_synchronizer.h" |
67 #include "content/browser/leveldb_wrapper_impl.h" | 67 #include "content/browser/leveldb_wrapper_impl.h" |
68 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 68 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
69 #include "content/browser/loader_delegate_impl.h" | 69 #include "content/browser/loader_delegate_impl.h" |
70 #include "content/browser/media/media_internals.h" | 70 #include "content/browser/media/media_internals.h" |
71 #include "content/browser/memory/memory_coordinator_impl.h" | 71 #include "content/browser/memory/memory_coordinator_impl.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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 | 608 |
608 if (parsed_command_line_.HasSwitch(switches::kRendererProcessLimit)) { | 609 if (parsed_command_line_.HasSwitch(switches::kRendererProcessLimit)) { |
609 std::string limit_string = parsed_command_line_.GetSwitchValueASCII( | 610 std::string limit_string = parsed_command_line_.GetSwitchValueASCII( |
610 switches::kRendererProcessLimit); | 611 switches::kRendererProcessLimit); |
611 size_t process_limit; | 612 size_t process_limit; |
612 if (base::StringToSizeT(limit_string, &process_limit)) { | 613 if (base::StringToSizeT(limit_string, &process_limit)) { |
613 RenderProcessHost::SetMaxRendererProcessCount(process_limit); | 614 RenderProcessHost::SetMaxRendererProcessCount(process_limit); |
614 } | 615 } |
615 } | 616 } |
616 | 617 |
| 618 if (parsed_command_line_.HasSwitch(switches::kIsolateOrigins)) { |
| 619 SiteInstanceImpl::AddIsolatedOriginsFromCommandLine( |
| 620 parsed_command_line_.GetSwitchValueASCII(switches::kIsolateOrigins)); |
| 621 } |
| 622 |
617 if (parts_) | 623 if (parts_) |
618 parts_->PostEarlyInitialization(); | 624 parts_->PostEarlyInitialization(); |
619 } | 625 } |
620 | 626 |
621 void BrowserMainLoop::PreMainMessageLoopStart() { | 627 void BrowserMainLoop::PreMainMessageLoopStart() { |
622 if (parts_) { | 628 if (parts_) { |
623 TRACE_EVENT0("startup", | 629 TRACE_EVENT0("startup", |
624 "BrowserMainLoop::MainMessageLoopStart:PreMainMessageLoopStart"); | 630 "BrowserMainLoop::MainMessageLoopStart:PreMainMessageLoopStart"); |
625 parts_->PreMainMessageLoopStart(); | 631 parts_->PreMainMessageLoopStart(); |
626 } | 632 } |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1749 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), | 1755 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
1750 MediaInternals::GetInstance()); | 1756 MediaInternals::GetInstance()); |
1751 } | 1757 } |
1752 CHECK(audio_manager_); | 1758 CHECK(audio_manager_); |
1753 | 1759 |
1754 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); | 1760 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); |
1755 CHECK(audio_system_); | 1761 CHECK(audio_system_); |
1756 } | 1762 } |
1757 | 1763 |
1758 } // namespace content | 1764 } // namespace content |
OLD | NEW |