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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1039 TRACE_EVENT0("startup", | 1039 TRACE_EVENT0("startup", |
1040 "BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition"); | 1040 "BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition"); |
1041 speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl( | 1041 speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl( |
1042 audio_manager_.get(), media_stream_manager_.get())); | 1042 audio_manager_.get(), media_stream_manager_.get())); |
1043 } | 1043 } |
1044 | 1044 |
1045 { | 1045 { |
1046 TRACE_EVENT0( | 1046 TRACE_EVENT0( |
1047 "startup", | 1047 "startup", |
1048 "BrowserMainLoop::BrowserThreadsStarted::InitUserInputMonitor"); | 1048 "BrowserMainLoop::BrowserThreadsStarted::InitUserInputMonitor"); |
1049 user_input_monitor_ = media::UserInputMonitor::Create( | 1049 if (io_thread_->message_loop_proxy().get() != NULL && |
Charlie Reis
2014/09/11 23:10:30
If we want to confirm that the cause of this crash
jiayl
2014/09/11 23:55:37
I tested it with your suggestion, but IsRunning()
| |
1050 io_thread_->message_loop_proxy(), main_thread_->message_loop_proxy()); | 1050 main_thread_->message_loop_proxy().get() != NULL) { |
1051 user_input_monitor_ = media::UserInputMonitor::Create( | |
1052 io_thread_->message_loop_proxy(), main_thread_->message_loop_proxy()); | |
Charlie Reis
2014/09/11 23:10:30
Can this use task_runner() instead of message_loop
jiayl
2014/09/11 23:55:37
Will do.
| |
1053 } | |
1051 } | 1054 } |
1052 | 1055 |
1053 { | 1056 { |
1054 TRACE_EVENT0("startup", | 1057 TRACE_EVENT0("startup", |
1055 "BrowserMainLoop::BrowserThreadsStarted::TimeZoneMonitor"); | 1058 "BrowserMainLoop::BrowserThreadsStarted::TimeZoneMonitor"); |
1056 time_zone_monitor_ = TimeZoneMonitor::Create(); | 1059 time_zone_monitor_ = TimeZoneMonitor::Create(); |
1057 } | 1060 } |
1058 | 1061 |
1059 // Alert the clipboard class to which threads are allowed to access the | 1062 // Alert the clipboard class to which threads are allowed to access the |
1060 // clipboard: | 1063 // clipboard: |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1194 &BrowserMainLoop::EndStartupTracing); | 1197 &BrowserMainLoop::EndStartupTracing); |
1195 } | 1198 } |
1196 | 1199 |
1197 void BrowserMainLoop::EndStartupTracing() { | 1200 void BrowserMainLoop::EndStartupTracing() { |
1198 is_tracing_startup_ = false; | 1201 is_tracing_startup_ = false; |
1199 TracingController::GetInstance()->DisableRecording( | 1202 TracingController::GetInstance()->DisableRecording( |
1200 startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); | 1203 startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); |
1201 } | 1204 } |
1202 | 1205 |
1203 } // namespace content | 1206 } // namespace content |
OLD | NEW |