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/hi_res_timer_manager.h" | 10 #include "base/hi_res_timer_manager.h" |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 | 614 |
615 #if !defined(OS_IOS) | 615 #if !defined(OS_IOS) |
616 // Must happen after the IO thread is shutdown since this may be accessed from | 616 // Must happen after the IO thread is shutdown since this may be accessed from |
617 // it. | 617 // it. |
618 BrowserGpuChannelHostFactory::Terminate(); | 618 BrowserGpuChannelHostFactory::Terminate(); |
619 | 619 |
620 // Must happen after the I/O thread is shutdown since this class lives on the | 620 // Must happen after the I/O thread is shutdown since this class lives on the |
621 // I/O thread and isn't threadsafe. | 621 // I/O thread and isn't threadsafe. |
622 GamepadService::GetInstance()->Terminate(); | 622 GamepadService::GetInstance()->Terminate(); |
623 | 623 |
624 ChromeURLDataManager::DeleteDataSources(); | 624 URLDataManager::DeleteDataSources(); |
625 #endif // !defined(OS_IOS) | 625 #endif // !defined(OS_IOS) |
626 | 626 |
627 if (parts_.get()) | 627 if (parts_.get()) |
628 parts_->PostDestroyThreads(); | 628 parts_->PostDestroyThreads(); |
629 } | 629 } |
630 | 630 |
631 void BrowserMainLoop::InitializeMainThread() { | 631 void BrowserMainLoop::InitializeMainThread() { |
632 const char* kThreadName = "CrBrowserMain"; | 632 const char* kThreadName = "CrBrowserMain"; |
633 base::PlatformThread::SetName(kThreadName); | 633 base::PlatformThread::SetName(kThreadName); |
634 if (main_message_loop_.get()) | 634 if (main_message_loop_.get()) |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 773 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
774 if (parameters_.ui_task) | 774 if (parameters_.ui_task) |
775 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); | 775 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); |
776 | 776 |
777 base::RunLoop run_loop; | 777 base::RunLoop run_loop; |
778 run_loop.Run(); | 778 run_loop.Run(); |
779 #endif | 779 #endif |
780 } | 780 } |
781 | 781 |
782 } // namespace content | 782 } // namespace content |
OLD | NEW |