| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #include "content/browser/system_message_window_win.h" | 59 #include "content/browser/system_message_window_win.h" |
| 60 #include "content/common/sandbox_policy.h" | 60 #include "content/common/sandbox_policy.h" |
| 61 #include "ui/base/l10n/l10n_util_win.h" | 61 #include "ui/base/l10n/l10n_util_win.h" |
| 62 #include "net/base/winsock_init.h" | 62 #include "net/base/winsock_init.h" |
| 63 #endif | 63 #endif |
| 64 | 64 |
| 65 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 65 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 66 #include <glib-object.h> | 66 #include <glib-object.h> |
| 67 #endif | 67 #endif |
| 68 | 68 |
| 69 #if defined(OS_LINUX) |
| 70 #include "content/browser/device_monitor_linux.h" |
| 71 #endif |
| 72 |
| 69 #if defined(OS_CHROMEOS) | 73 #if defined(OS_CHROMEOS) |
| 70 #include <dbus/dbus-glib.h> | 74 #include <dbus/dbus-glib.h> |
| 71 #endif | 75 #endif |
| 72 | 76 |
| 73 #if defined(TOOLKIT_GTK) | 77 #if defined(TOOLKIT_GTK) |
| 74 #include "ui/gfx/gtk_util.h" | 78 #include "ui/gfx/gtk_util.h" |
| 75 #endif | 79 #endif |
| 76 | 80 |
| 77 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 81 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 78 #include <sys/stat.h> | 82 #include <sys/stat.h> |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 | 612 |
| 609 | 613 |
| 610 void BrowserMainLoop::BrowserThreadsStarted() { | 614 void BrowserMainLoop::BrowserThreadsStarted() { |
| 611 HistogramSynchronizer::GetInstance(); | 615 HistogramSynchronizer::GetInstance(); |
| 612 | 616 |
| 613 content::BrowserGpuChannelHostFactory::Initialize(); | 617 content::BrowserGpuChannelHostFactory::Initialize(); |
| 614 #if defined(USE_AURA) | 618 #if defined(USE_AURA) |
| 615 ImageTransportFactory::Initialize(); | 619 ImageTransportFactory::Initialize(); |
| 616 #endif | 620 #endif |
| 617 | 621 |
| 622 #if defined(OS_LINUX) |
| 623 device_monitor_linux_.reset(new DeviceMonitorLinux()); |
| 624 #endif |
| 625 |
| 618 // RDH needs the IO thread to be created. | 626 // RDH needs the IO thread to be created. |
| 619 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); | 627 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); |
| 620 | 628 |
| 621 #if defined(ENABLE_INPUT_SPEECH) | 629 #if defined(ENABLE_INPUT_SPEECH) |
| 622 speech_recognition_manager_.reset(new speech::SpeechRecognitionManagerImpl()); | 630 speech_recognition_manager_.reset(new speech::SpeechRecognitionManagerImpl()); |
| 623 #endif | 631 #endif |
| 624 | 632 |
| 625 // Start the GpuDataManager before we set up the MessageLoops because | 633 // Start the GpuDataManager before we set up the MessageLoops because |
| 626 // otherwise we'll trigger the assertion about doing IO on the UI thread. | 634 // otherwise we'll trigger the assertion about doing IO on the UI thread. |
| 627 content::GpuDataManager::GetInstance(); | 635 content::GpuDataManager::GetInstance(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 683 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
| 676 if (parameters_.ui_task) | 684 if (parameters_.ui_task) |
| 677 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); | 685 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); |
| 678 | 686 |
| 679 base::RunLoop run_loop; | 687 base::RunLoop run_loop; |
| 680 run_loop.Run(); | 688 run_loop.Run(); |
| 681 #endif | 689 #endif |
| 682 } | 690 } |
| 683 | 691 |
| 684 } // namespace content | 692 } // namespace content |
| OLD | NEW |