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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 | 645 |
646 #if defined(OS_LINUX) | 646 #if defined(OS_LINUX) |
647 device_monitor_linux_.reset(new DeviceMonitorLinux()); | 647 device_monitor_linux_.reset(new DeviceMonitorLinux()); |
648 #elif defined(OS_MACOSX) | 648 #elif defined(OS_MACOSX) |
649 device_monitor_mac_.reset(new DeviceMonitorMac()); | 649 device_monitor_mac_.reset(new DeviceMonitorMac()); |
650 #endif | 650 #endif |
651 | 651 |
652 // RDH needs the IO thread to be created. | 652 // RDH needs the IO thread to be created. |
653 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); | 653 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); |
654 | 654 |
655 // Start the GpuDataManager before we set up the MessageLoops because | 655 // Initialize the GpuDataManager before we set up the MessageLoops because |
656 // otherwise we'll trigger the assertion about doing IO on the UI thread. | 656 // otherwise we'll trigger the assertion about doing IO on the UI thread. |
657 content::GpuDataManager::GetInstance(); | 657 content::GpuDataManager::GetInstance()->Initialize(); |
658 #endif // !OS_IOS | 658 #endif // !OS_IOS |
659 | 659 |
660 #if defined(ENABLE_INPUT_SPEECH) | 660 #if defined(ENABLE_INPUT_SPEECH) |
661 speech_recognition_manager_.reset(new speech::SpeechRecognitionManagerImpl()); | 661 speech_recognition_manager_.reset(new speech::SpeechRecognitionManagerImpl()); |
662 #endif | 662 #endif |
663 | 663 |
664 // Alert the clipboard class to which threads are allowed to access the | 664 // Alert the clipboard class to which threads are allowed to access the |
665 // clipboard: | 665 // clipboard: |
666 std::vector<base::PlatformThreadId> allowed_clipboard_threads; | 666 std::vector<base::PlatformThreadId> allowed_clipboard_threads; |
667 // The current thread is the UI thread. | 667 // The current thread is the UI thread. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 722 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
723 if (parameters_.ui_task) | 723 if (parameters_.ui_task) |
724 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); | 724 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); |
725 | 725 |
726 base::RunLoop run_loop; | 726 base::RunLoop run_loop; |
727 run_loop.Run(); | 727 run_loop.Run(); |
728 #endif | 728 #endif |
729 } | 729 } |
730 | 730 |
731 } // namespace content | 731 } // namespace content |
OLD | NEW |