| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 #if !defined(OS_ANDROID) | 162 #if !defined(OS_ANDROID) |
| 163 #include "content/public/browser/zygote_handle_linux.h" | 163 #include "content/public/browser/zygote_handle_linux.h" |
| 164 #endif // !defined(OS_ANDROID) | 164 #endif // !defined(OS_ANDROID) |
| 165 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 165 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| 166 | 166 |
| 167 | 167 |
| 168 #if defined(ENABLE_PLUGINS) | 168 #if defined(ENABLE_PLUGINS) |
| 169 #include "content/browser/plugin_service_impl.h" | 169 #include "content/browser/plugin_service_impl.h" |
| 170 #endif | 170 #endif |
| 171 | 171 |
| 172 #if defined(ENABLE_MOJO_CDM) && defined(ENABLE_PEPPER_CDMS) |
| 173 #include "content/browser/media/cdm_service_impl.h" |
| 174 #endif |
| 175 |
| 172 #if defined(USE_X11) | 176 #if defined(USE_X11) |
| 173 #include "ui/base/x/x11_util_internal.h" | 177 #include "ui/base/x/x11_util_internal.h" |
| 174 #include "ui/gfx/x/x11_connection.h" // nogncheck | 178 #include "ui/gfx/x/x11_connection.h" // nogncheck |
| 175 #include "ui/gfx/x/x11_switches.h" // nogncheck | 179 #include "ui/gfx/x/x11_switches.h" // nogncheck |
| 176 #include "ui/gfx/x/x11_types.h" // nogncheck | 180 #include "ui/gfx/x/x11_types.h" // nogncheck |
| 177 #endif | 181 #endif |
| 178 | 182 |
| 179 #if defined(USE_NSS_CERTS) | 183 #if defined(USE_NSS_CERTS) |
| 180 #include "crypto/nss_util.h" | 184 #include "crypto/nss_util.h" |
| 181 #endif | 185 #endif |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 // Prior to any processing happening on the IO thread, we create the | 734 // Prior to any processing happening on the IO thread, we create the |
| 731 // plugin service as it is predominantly used from the IO thread, | 735 // plugin service as it is predominantly used from the IO thread, |
| 732 // but must be created on the main thread. The service ctor is | 736 // but must be created on the main thread. The service ctor is |
| 733 // inexpensive and does not invoke the io_thread() accessor. | 737 // inexpensive and does not invoke the io_thread() accessor. |
| 734 { | 738 { |
| 735 TRACE_EVENT0("startup", "BrowserMainLoop::CreateThreads:PluginService"); | 739 TRACE_EVENT0("startup", "BrowserMainLoop::CreateThreads:PluginService"); |
| 736 PluginService::GetInstance()->Init(); | 740 PluginService::GetInstance()->Init(); |
| 737 } | 741 } |
| 738 #endif | 742 #endif |
| 739 | 743 |
| 744 #if defined(ENABLE_MOJO_CDM) && defined(ENABLE_PEPPER_CDMS) |
| 745 // Prior to any processing happening on the IO thread, we create the |
| 746 // CDM service as it is predominantly used from the IO thread. This must |
| 747 // be called on the main thread since it involves file path checks. |
| 748 CdmService::GetInstance()->Init(); |
| 749 #endif |
| 750 |
| 740 #if defined(OS_MACOSX) | 751 #if defined(OS_MACOSX) |
| 741 // The WindowResizeHelper allows the UI thread to wait on specific renderer | 752 // The WindowResizeHelper allows the UI thread to wait on specific renderer |
| 742 // and GPU messages from the IO thread. Initializing it before the IO thread | 753 // and GPU messages from the IO thread. Initializing it before the IO thread |
| 743 // starts ensures the affected IO thread messages always have somewhere to go. | 754 // starts ensures the affected IO thread messages always have somewhere to go. |
| 744 ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get()); | 755 ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get()); |
| 745 #endif | 756 #endif |
| 746 | 757 |
| 747 // 1) Need to initialize in-process GpuDataManager before creating threads. | 758 // 1) Need to initialize in-process GpuDataManager before creating threads. |
| 748 // It's unsafe to append the gpu command line switches to the global | 759 // It's unsafe to append the gpu command line switches to the global |
| 749 // CommandLine::ForCurrentProcess object after threads are created. | 760 // CommandLine::ForCurrentProcess object after threads are created. |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 audio_task_runner = audio_thread_->task_runner(); | 1502 audio_task_runner = audio_thread_->task_runner(); |
| 1492 worker_task_runner = audio_thread_->task_runner(); | 1503 worker_task_runner = audio_thread_->task_runner(); |
| 1493 monitor_task_runner = io_thread_->task_runner(); | 1504 monitor_task_runner = io_thread_->task_runner(); |
| 1494 #endif // defined(OS_MACOSX) | 1505 #endif // defined(OS_MACOSX) |
| 1495 audio_manager_ = media::AudioManager::Create( | 1506 audio_manager_ = media::AudioManager::Create( |
| 1496 std::move(audio_task_runner), std::move(worker_task_runner), | 1507 std::move(audio_task_runner), std::move(worker_task_runner), |
| 1497 std::move(monitor_task_runner), MediaInternals::GetInstance()); | 1508 std::move(monitor_task_runner), MediaInternals::GetInstance()); |
| 1498 } | 1509 } |
| 1499 | 1510 |
| 1500 } // namespace content | 1511 } // namespace content |
| OLD | NEW |