Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 189443010: Mac AVFoundation/QTKit: delay DeviceMonitorMac startup to first GetUserMedia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/file_util.h" 10 #include "base/file_util.h"
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 URLDataManager::DeleteDataSources(); 902 URLDataManager::DeleteDataSources();
903 } 903 }
904 #endif // !defined(OS_IOS) 904 #endif // !defined(OS_IOS)
905 905
906 if (parts_) { 906 if (parts_) {
907 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:PostDestroyThreads"); 907 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:PostDestroyThreads");
908 parts_->PostDestroyThreads(); 908 parts_->PostDestroyThreads();
909 } 909 }
910 } 910 }
911 911
912 #if defined(OS_MACOSX) && !defined(OS_IOS)
913 void BrowserMainLoop::StartMonitoring() {
914 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
915 device_monitor_mac_->StartMonitoring();
916 }
917 #endif
918
912 void BrowserMainLoop::InitializeMainThread() { 919 void BrowserMainLoop::InitializeMainThread() {
913 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeMainThread") 920 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeMainThread")
914 const char* kThreadName = "CrBrowserMain"; 921 const char* kThreadName = "CrBrowserMain";
915 base::PlatformThread::SetName(kThreadName); 922 base::PlatformThread::SetName(kThreadName);
916 if (main_message_loop_) 923 if (main_message_loop_)
917 main_message_loop_->set_thread_name(kThreadName); 924 main_message_loop_->set_thread_name(kThreadName);
918 925
919 // Register the main thread by instantiating it, but don't call any methods. 926 // Register the main thread by instantiating it, but don't call any methods.
920 main_thread_.reset( 927 main_thread_.reset(
921 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); 928 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current()));
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 base::TimeDelta::FromSeconds(delay_secs)); 1131 base::TimeDelta::FromSeconds(delay_secs));
1125 } 1132 }
1126 1133
1127 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { 1134 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) {
1128 is_tracing_startup_ = false; 1135 is_tracing_startup_ = false;
1129 TracingController::GetInstance()->DisableRecording( 1136 TracingController::GetInstance()->DisableRecording(
1130 trace_file, TracingController::TracingFileResultCallback()); 1137 trace_file, TracingController::TracingFileResultCallback());
1131 } 1138 }
1132 1139
1133 } // namespace content 1140 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698