| 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/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 #include "content/browser/system_message_window_win.h" | 83 #include "content/browser/system_message_window_win.h" |
| 84 #include "content/common/sandbox_win.h" | 84 #include "content/common/sandbox_win.h" |
| 85 #include "net/base/winsock_init.h" | 85 #include "net/base/winsock_init.h" |
| 86 #include "ui/base/l10n/l10n_util_win.h" | 86 #include "ui/base/l10n/l10n_util_win.h" |
| 87 #endif | 87 #endif |
| 88 | 88 |
| 89 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 89 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 90 #include <glib-object.h> | 90 #include <glib-object.h> |
| 91 #endif | 91 #endif |
| 92 | 92 |
| 93 #if defined(OS_LINUX) | 93 #if defined(OS_LINUX) && defined(USE_UDEV) |
| 94 #include "content/browser/device_monitor_linux.h" | 94 #include "content/browser/device_monitor_udev.h" |
| 95 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 95 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
| 96 #include "content/browser/device_monitor_mac.h" | 96 #include "content/browser/device_monitor_mac.h" |
| 97 #endif | 97 #endif |
| 98 | 98 |
| 99 #if defined(TOOLKIT_GTK) | 99 #if defined(TOOLKIT_GTK) |
| 100 #include "ui/gfx/gtk_util.h" | 100 #include "ui/gfx/gtk_util.h" |
| 101 #endif | 101 #endif |
| 102 | 102 |
| 103 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 103 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 104 #include <sys/stat.h> | 104 #include <sys/stat.h> |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) { | 953 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) { |
| 954 established_gpu_channel = always_uses_gpu = false; | 954 established_gpu_channel = always_uses_gpu = false; |
| 955 } | 955 } |
| 956 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); | 956 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
| 957 ImageTransportFactory::Initialize(); | 957 ImageTransportFactory::Initialize(); |
| 958 #elif defined(OS_ANDROID) | 958 #elif defined(OS_ANDROID) |
| 959 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); | 959 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
| 960 #endif | 960 #endif |
| 961 #endif | 961 #endif |
| 962 | 962 |
| 963 #if defined(OS_LINUX) | 963 #if defined(OS_LINUX) && defined(USE_UDEV) |
| 964 device_monitor_linux_.reset(new DeviceMonitorLinux()); | 964 device_monitor_linux_.reset(new DeviceMonitorLinux()); |
| 965 #elif defined(OS_MACOSX) | 965 #elif defined(OS_MACOSX) |
| 966 device_monitor_mac_.reset(new DeviceMonitorMac()); | 966 device_monitor_mac_.reset(new DeviceMonitorMac()); |
| 967 #endif | 967 #endif |
| 968 | 968 |
| 969 // RDH needs the IO thread to be created | 969 // RDH needs the IO thread to be created |
| 970 { | 970 { |
| 971 TRACE_EVENT0("startup", | 971 TRACE_EVENT0("startup", |
| 972 "BrowserMainLoop::BrowserThreadsStarted:InitResourceDispatcherHost"); | 972 "BrowserMainLoop::BrowserThreadsStarted:InitResourceDispatcherHost"); |
| 973 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); | 973 resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl()); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 if (parameters_.ui_task) | 1069 if (parameters_.ui_task) |
| 1070 base::MessageLoopForUI::current()->PostTask(FROM_HERE, | 1070 base::MessageLoopForUI::current()->PostTask(FROM_HERE, |
| 1071 *parameters_.ui_task); | 1071 *parameters_.ui_task); |
| 1072 | 1072 |
| 1073 base::RunLoop run_loop; | 1073 base::RunLoop run_loop; |
| 1074 run_loop.Run(); | 1074 run_loop.Run(); |
| 1075 #endif | 1075 #endif |
| 1076 } | 1076 } |
| 1077 | 1077 |
| 1078 } // namespace content | 1078 } // namespace content |
| OLD | NEW |