| Index: content/browser/browser_main_loop.cc
|
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
| index bf849b7102faea1e3a43481ba86002731013d640..c0bfa6f0087f3e471320e80a4d8fe2f4c77f53e2 100644
|
| --- a/content/browser/browser_main_loop.cc
|
| +++ b/content/browser/browser_main_loop.cc
|
| @@ -95,6 +95,7 @@
|
| #include "media/audio/audio_system_impl.h"
|
| #include "media/base/media.h"
|
| #include "media/base/user_input_monitor.h"
|
| +#include "media/base/video_facing.h"
|
| #include "media/midi/midi_service.h"
|
| #include "mojo/edk/embedder/embedder.h"
|
| #include "mojo/edk/embedder/scoped_ipc_support.h"
|
| @@ -163,6 +164,7 @@
|
|
|
| #if defined(OS_CHROMEOS)
|
| #include "base/memory/memory_pressure_monitor_chromeos.h"
|
| +#include "chromeos/audio/cras_audio_handler.h"
|
| #include "chromeos/chromeos_switches.h"
|
| #endif
|
|
|
| @@ -1164,6 +1166,19 @@ int BrowserMainLoop::PreMainMessageLoopRun() {
|
| "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun");
|
|
|
| parts_->PreMainMessageLoopRun();
|
| +
|
| +#if defined(OS_CHROMEOS)
|
| + if (chromeos::CrasAudioHandler::IsInitialized()) {
|
| + if (media_stream_manager_.get() != NULL) {
|
| + media_stream_manager_->AddVideoCaptureObserver(
|
| + chromeos::CrasAudioHandler::Get());
|
| + } else {
|
| + DLOG(ERROR) << "media_stream_manager_ is null.";
|
| + }
|
| + } else {
|
| + DLOG(ERROR) << "CrasAudioHandler is not initialized.";
|
| + }
|
| +#endif
|
| }
|
|
|
| // If the UI thread blocks, the whole UI is unresponsive.
|
| @@ -1213,6 +1228,7 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
|
| if (parts_) {
|
| TRACE_EVENT0("shutdown",
|
| "BrowserMainLoop::Subsystem:PostMainMessageLoopRun");
|
| + media_stream_manager_->RemoveAllVideoCaptureObservers();
|
| parts_->PostMainMessageLoopRun();
|
| }
|
|
|
|
|