| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 #include "content/common/host_shared_bitmap_manager.h" | 69 #include "content/common/host_shared_bitmap_manager.h" |
| 70 #include "content/common/mojo/mojo_shell_connection_impl.h" | 70 #include "content/common/mojo/mojo_shell_connection_impl.h" |
| 71 #include "content/public/browser/browser_main_parts.h" | 71 #include "content/public/browser/browser_main_parts.h" |
| 72 #include "content/public/browser/content_browser_client.h" | 72 #include "content/public/browser/content_browser_client.h" |
| 73 #include "content/public/browser/render_process_host.h" | 73 #include "content/public/browser/render_process_host.h" |
| 74 #include "content/public/browser/tracing_controller.h" | 74 #include "content/public/browser/tracing_controller.h" |
| 75 #include "content/public/common/content_switches.h" | 75 #include "content/public/common/content_switches.h" |
| 76 #include "content/public/common/main_function_params.h" | 76 #include "content/public/common/main_function_params.h" |
| 77 #include "content/public/common/result_codes.h" | 77 #include "content/public/common/result_codes.h" |
| 78 #include "device/battery/battery_status_service.h" | 78 #include "device/battery/battery_status_service.h" |
| 79 #include "ipc/mojo/scoped_ipc_support.h" | |
| 80 #include "media/base/media.h" | 79 #include "media/base/media.h" |
| 81 #include "media/base/user_input_monitor.h" | 80 #include "media/base/user_input_monitor.h" |
| 82 #include "media/midi/midi_manager.h" | 81 #include "media/midi/midi_manager.h" |
| 83 #include "mojo/edk/embedder/embedder.h" | 82 #include "mojo/edk/embedder/embedder.h" |
| 83 #include "mojo/edk/embedder/scoped_ipc_support.h" |
| 84 #include "net/base/network_change_notifier.h" | 84 #include "net/base/network_change_notifier.h" |
| 85 #include "net/socket/client_socket_factory.h" | 85 #include "net/socket/client_socket_factory.h" |
| 86 #include "net/ssl/ssl_config_service.h" | 86 #include "net/ssl/ssl_config_service.h" |
| 87 #include "services/shell/runner/common/client_util.h" | 87 #include "services/shell/runner/common/client_util.h" |
| 88 #include "skia/ext/event_tracer_impl.h" | 88 #include "skia/ext/event_tracer_impl.h" |
| 89 #include "skia/ext/skia_memory_dump_provider.h" | 89 #include "skia/ext/skia_memory_dump_provider.h" |
| 90 #include "sql/sql_memory_dump_provider.h" | 90 #include "sql/sql_memory_dump_provider.h" |
| 91 #include "ui/base/clipboard/clipboard.h" | 91 #include "ui/base/clipboard/clipboard.h" |
| 92 | 92 |
| 93 #if defined(USE_AURA) || defined(OS_MACOSX) | 93 #if defined(USE_AURA) || defined(OS_MACOSX) |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 | 1146 |
| 1147 // Register the main thread by instantiating it, but don't call any methods. | 1147 // Register the main thread by instantiating it, but don't call any methods. |
| 1148 main_thread_.reset( | 1148 main_thread_.reset( |
| 1149 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); | 1149 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); |
| 1150 } | 1150 } |
| 1151 | 1151 |
| 1152 int BrowserMainLoop::BrowserThreadsStarted() { | 1152 int BrowserMainLoop::BrowserThreadsStarted() { |
| 1153 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); | 1153 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); |
| 1154 | 1154 |
| 1155 // Bring up Mojo IPC and shell as early as possible. | 1155 // Bring up Mojo IPC and shell as early as possible. |
| 1156 mojo_ipc_support_.reset(new IPC::ScopedIPCSupport( | 1156 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport( |
| 1157 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) | 1157 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) |
| 1158 ->task_runner())); | 1158 ->task_runner())); |
| 1159 | 1159 |
| 1160 mojo_shell_context_.reset(new MojoShellContext); | 1160 mojo_shell_context_.reset(new MojoShellContext); |
| 1161 if (shell::ShellIsRemote()) { | 1161 if (shell::ShellIsRemote()) { |
| 1162 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) | 1162 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) |
| 1163 // TODO(rockot): Remove the blocking wait for init. | 1163 // TODO(rockot): Remove the blocking wait for init. |
| 1164 // http://crbug.com/594852. | 1164 // http://crbug.com/594852. |
| 1165 if (MojoShellConnection::GetForProcess()) | 1165 if (MojoShellConnection::GetForProcess()) |
| 1166 WaitForMojoShellInitialize(); | 1166 WaitForMojoShellInitialize(); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 std::move(worker_task_runner), | 1491 std::move(worker_task_runner), |
| 1492 MediaInternals::GetInstance()); | 1492 MediaInternals::GetInstance()); |
| 1493 } | 1493 } |
| 1494 CHECK(audio_manager_); | 1494 CHECK(audio_manager_); |
| 1495 | 1495 |
| 1496 if (use_hang_monitor) | 1496 if (use_hang_monitor) |
| 1497 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); | 1497 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); |
| 1498 } | 1498 } |
| 1499 | 1499 |
| 1500 } // namespace content | 1500 } // namespace content |
| OLD | NEW |