| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 #include "base/win/windows_version.h" | 156 #include "base/win/windows_version.h" |
| 157 #include "content/browser/screen_orientation/screen_orientation_delegate_win.h" | 157 #include "content/browser/screen_orientation/screen_orientation_delegate_win.h" |
| 158 #include "content/common/sandbox_win.h" | 158 #include "content/common/sandbox_win.h" |
| 159 #include "net/base/winsock_init.h" | 159 #include "net/base/winsock_init.h" |
| 160 #include "ui/base/l10n/l10n_util_win.h" | 160 #include "ui/base/l10n/l10n_util_win.h" |
| 161 #endif | 161 #endif |
| 162 | 162 |
| 163 #if defined(OS_CHROMEOS) | 163 #if defined(OS_CHROMEOS) |
| 164 #include "base/memory/memory_pressure_monitor_chromeos.h" | 164 #include "base/memory/memory_pressure_monitor_chromeos.h" |
| 165 #include "chromeos/chromeos_switches.h" | 165 #include "chromeos/chromeos_switches.h" |
| 166 #include "chromeos/audio/cras_audio_handler.h" |
| 166 #endif | 167 #endif |
| 167 | 168 |
| 168 #if defined(USE_GLIB) | 169 #if defined(USE_GLIB) |
| 169 #include <glib-object.h> | 170 #include <glib-object.h> |
| 170 #endif | 171 #endif |
| 171 | 172 |
| 172 #if defined(OS_WIN) | 173 #if defined(OS_WIN) |
| 173 #include "media/device_monitors/system_message_window_win.h" | 174 #include "media/device_monitors/system_message_window_win.h" |
| 174 #elif defined(OS_LINUX) && defined(USE_UDEV) | 175 #elif defined(OS_LINUX) && defined(USE_UDEV) |
| 175 #include "media/device_monitors/device_monitor_udev.h" | 176 #include "media/device_monitors/device_monitor_udev.h" |
| (...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1517 GetContentClient()->browser()->ResourceDispatcherHostCreated(); | 1518 GetContentClient()->browser()->ResourceDispatcherHostCreated(); |
| 1518 | 1519 |
| 1519 loader_delegate_.reset(new LoaderDelegateImpl()); | 1520 loader_delegate_.reset(new LoaderDelegateImpl()); |
| 1520 resource_dispatcher_host_->SetLoaderDelegate(loader_delegate_.get()); | 1521 resource_dispatcher_host_->SetLoaderDelegate(loader_delegate_.get()); |
| 1521 } | 1522 } |
| 1522 | 1523 |
| 1523 // MediaStreamManager needs the IO thread to be created. | 1524 // MediaStreamManager needs the IO thread to be created. |
| 1524 { | 1525 { |
| 1525 TRACE_EVENT0("startup", | 1526 TRACE_EVENT0("startup", |
| 1526 "BrowserMainLoop::BrowserThreadsStarted:InitMediaStreamManager"); | 1527 "BrowserMainLoop::BrowserThreadsStarted:InitMediaStreamManager"); |
| 1527 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get())); | 1528 #if defined(IS_CHROMEOS) |
| 1529 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get(), |
| 1530 static_cast<component::Vi
deoCaptureObserver*>(CrasAudioHandler::Get()))); |
| 1531 #else |
| 1532 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()), NU
LL); |
| 1533 #endif |
| 1528 } | 1534 } |
| 1529 | 1535 |
| 1530 { | 1536 { |
| 1531 TRACE_EVENT0("startup", | 1537 TRACE_EVENT0("startup", |
| 1532 "BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition"); | 1538 "BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition"); |
| 1533 speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl( | 1539 speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl( |
| 1534 audio_manager_.get(), media_stream_manager_.get())); | 1540 audio_manager_.get(), media_stream_manager_.get())); |
| 1535 } | 1541 } |
| 1536 | 1542 |
| 1537 { | 1543 { |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1786 if (!audio_manager_) { | 1792 if (!audio_manager_) { |
| 1787 audio_thread_ = base::MakeUnique<AudioManagerThread>(); | 1793 audio_thread_ = base::MakeUnique<AudioManagerThread>(); |
| 1788 audio_manager_ = media::AudioManager::Create( | 1794 audio_manager_ = media::AudioManager::Create( |
| 1789 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), | 1795 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), |
| 1790 MediaInternals::GetInstance()); | 1796 MediaInternals::GetInstance()); |
| 1791 } | 1797 } |
| 1792 CHECK(audio_manager_); | 1798 CHECK(audio_manager_); |
| 1793 } | 1799 } |
| 1794 | 1800 |
| 1795 } // namespace content | 1801 } // namespace content |
| OLD | NEW |