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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 | 656 |
657 // RDH needs the IO thread to be created. | 657 // RDH needs the IO thread to be created. |
658 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); | 658 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); |
659 | 659 |
660 // Initialize the GpuDataManager before we set up the MessageLoops because | 660 // Initialize the GpuDataManager before we set up the MessageLoops because |
661 // otherwise we'll trigger the assertion about doing IO on the UI thread. | 661 // otherwise we'll trigger the assertion about doing IO on the UI thread. |
662 GpuDataManagerImpl::GetInstance()->Initialize(); | 662 GpuDataManagerImpl::GetInstance()->Initialize(); |
663 #endif // !OS_IOS | 663 #endif // !OS_IOS |
664 | 664 |
665 #if defined(ENABLE_INPUT_SPEECH) | 665 #if defined(ENABLE_INPUT_SPEECH) |
666 speech_recognition_manager_.reset(new speech::SpeechRecognitionManagerImpl()); | 666 speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl()); |
667 #endif | 667 #endif |
668 | 668 |
669 #if !defined(OS_IOS) | 669 #if !defined(OS_IOS) |
670 // Alert the clipboard class to which threads are allowed to access the | 670 // Alert the clipboard class to which threads are allowed to access the |
671 // clipboard: | 671 // clipboard: |
672 std::vector<base::PlatformThreadId> allowed_clipboard_threads; | 672 std::vector<base::PlatformThreadId> allowed_clipboard_threads; |
673 // The current thread is the UI thread. | 673 // The current thread is the UI thread. |
674 allowed_clipboard_threads.push_back(base::PlatformThread::CurrentId()); | 674 allowed_clipboard_threads.push_back(base::PlatformThread::CurrentId()); |
675 #if defined(OS_WIN) | 675 #if defined(OS_WIN) |
676 // On Windows, clipboards are also used on the File or IO threads. | 676 // On Windows, clipboards are also used on the File or IO threads. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 729 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
730 if (parameters_.ui_task) | 730 if (parameters_.ui_task) |
731 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); | 731 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); |
732 | 732 |
733 base::RunLoop run_loop; | 733 base::RunLoop run_loop; |
734 run_loop.Run(); | 734 run_loop.Run(); |
735 #endif | 735 #endif |
736 } | 736 } |
737 | 737 |
738 } // namespace content | 738 } // namespace content |
OLD | NEW |