| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 #include "content/browser/system_message_window_win.h" | 70 #include "content/browser/system_message_window_win.h" |
| 71 #include "content/common/sandbox_policy.h" | 71 #include "content/common/sandbox_policy.h" |
| 72 #include "ui/base/l10n/l10n_util_win.h" | 72 #include "ui/base/l10n/l10n_util_win.h" |
| 73 #include "net/base/winsock_init.h" | 73 #include "net/base/winsock_init.h" |
| 74 #endif | 74 #endif |
| 75 | 75 |
| 76 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 76 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 77 #include <glib-object.h> | 77 #include <glib-object.h> |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 #if defined(OS_LINUX) | 80 #if defined(OS_LINUX) && defined(USE_UDEV) |
| 81 #include "content/browser/device_monitor_linux.h" | 81 #include "content/browser/device_monitor_linux.h" |
| 82 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 82 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
| 83 #include "content/browser/device_monitor_mac.h" | 83 #include "content/browser/device_monitor_mac.h" |
| 84 #endif | 84 #endif |
| 85 | 85 |
| 86 #if defined(TOOLKIT_GTK) | 86 #if defined(TOOLKIT_GTK) |
| 87 #include "ui/gfx/gtk_util.h" | 87 #include "ui/gfx/gtk_util.h" |
| 88 #endif | 88 #endif |
| 89 | 89 |
| 90 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 90 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 #endif | 698 #endif |
| 699 | 699 |
| 700 #if !defined(OS_IOS) | 700 #if !defined(OS_IOS) |
| 701 HistogramSynchronizer::GetInstance(); | 701 HistogramSynchronizer::GetInstance(); |
| 702 | 702 |
| 703 BrowserGpuChannelHostFactory::Initialize(); | 703 BrowserGpuChannelHostFactory::Initialize(); |
| 704 #if defined(USE_AURA) | 704 #if defined(USE_AURA) |
| 705 ImageTransportFactory::Initialize(); | 705 ImageTransportFactory::Initialize(); |
| 706 #endif | 706 #endif |
| 707 | 707 |
| 708 #if defined(OS_LINUX) | 708 #if defined(OS_LINUX) && defined(USE_UDEV) |
| 709 device_monitor_linux_.reset(new DeviceMonitorLinux()); | 709 device_monitor_linux_.reset(new DeviceMonitorLinux()); |
| 710 #elif defined(OS_MACOSX) | 710 #elif defined(OS_MACOSX) |
| 711 device_monitor_mac_.reset(new DeviceMonitorMac()); | 711 device_monitor_mac_.reset(new DeviceMonitorMac()); |
| 712 #endif | 712 #endif |
| 713 | 713 |
| 714 // RDH needs the IO thread to be created. | 714 // RDH needs the IO thread to be created. |
| 715 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); | 715 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); |
| 716 | 716 |
| 717 // MediaStreamManager needs the IO thread to be created. | 717 // MediaStreamManager needs the IO thread to be created. |
| 718 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get())); | 718 media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get())); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 810 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
| 811 if (parameters_.ui_task) | 811 if (parameters_.ui_task) |
| 812 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); | 812 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); |
| 813 | 813 |
| 814 base::RunLoop run_loop; | 814 base::RunLoop run_loop; |
| 815 run_loop.Run(); | 815 run_loop.Run(); |
| 816 #endif | 816 #endif |
| 817 } | 817 } |
| 818 | 818 |
| 819 } // namespace content | 819 } // namespace content |
| OLD | NEW |