OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <objbase.h> | 8 #include <objbase.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
11 | 11 |
12 #include "app/hi_res_timer_manager.h" | |
13 #include "app/system_monitor.h" | |
14 #include "base/command_line.h" | 12 #include "base/command_line.h" |
15 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
16 #include "base/string_util.h" | 14 #include "base/string_util.h" |
17 #include "base/threading/platform_thread.h" | 15 #include "base/threading/platform_thread.h" |
18 #include "chrome/common/child_process.h" | 16 #include "chrome/common/child_process.h" |
19 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
20 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/default_plugin.h" | 19 #include "chrome/common/default_plugin.h" |
22 #include "chrome/common/gpu_plugin.h" | 20 #include "chrome/common/gpu_plugin.h" |
| 21 #include "chrome/common/hi_res_timer_manager.h" |
23 #include "chrome/common/logging_chrome.h" | 22 #include "chrome/common/logging_chrome.h" |
24 #include "chrome/common/main_function_params.h" | 23 #include "chrome/common/main_function_params.h" |
25 #include "chrome/plugin/plugin_thread.h" | 24 #include "chrome/plugin/plugin_thread.h" |
| 25 #include "ui/base/system_monitor/system_monitor.h" |
26 | 26 |
27 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
28 #include "chrome/test/injection_test_dll.h" | 28 #include "chrome/test/injection_test_dll.h" |
29 #include "sandbox/src/sandbox.h" | 29 #include "sandbox/src/sandbox.h" |
30 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 30 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
31 #include "base/global_descriptors_posix.h" | 31 #include "base/global_descriptors_posix.h" |
32 #include "ipc/ipc_descriptors.h" | 32 #include "ipc/ipc_descriptors.h" |
33 #endif | 33 #endif |
34 | 34 |
35 #if defined(USE_LINUX_BREAKPAD) | 35 #if defined(USE_LINUX_BREAKPAD) |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // The main thread of the plugin services UI. | 87 // The main thread of the plugin services UI. |
88 #if defined(OS_MACOSX) | 88 #if defined(OS_MACOSX) |
89 #if !defined(__LP64__) | 89 #if !defined(__LP64__) |
90 TrimInterposeEnvironment(); | 90 TrimInterposeEnvironment(); |
91 #endif | 91 #endif |
92 InitializeChromeApplication(); | 92 InitializeChromeApplication(); |
93 #endif | 93 #endif |
94 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 94 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
95 base::PlatformThread::SetName("CrPluginMain"); | 95 base::PlatformThread::SetName("CrPluginMain"); |
96 | 96 |
97 SystemMonitor system_monitor; | 97 ui::SystemMonitor system_monitor; |
98 HighResolutionTimerManager high_resolution_timer_manager; | 98 HighResolutionTimerManager high_resolution_timer_manager; |
99 | 99 |
100 const CommandLine& parsed_command_line = parameters.command_line_; | 100 const CommandLine& parsed_command_line = parameters.command_line_; |
101 | 101 |
102 #if defined(OS_LINUX) | 102 #if defined(OS_LINUX) |
103 | 103 |
104 #if defined(ARCH_CPU_64_BITS) | 104 #if defined(ARCH_CPU_64_BITS) |
105 WorkaroundFlashLAHF(); | 105 WorkaroundFlashLAHF(); |
106 #endif | 106 #endif |
107 | 107 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 170 |
171 MessageLoop::current()->Run(); | 171 MessageLoop::current()->Run(); |
172 } | 172 } |
173 | 173 |
174 #if defined(OS_WIN) | 174 #if defined(OS_WIN) |
175 CoUninitialize(); | 175 CoUninitialize(); |
176 #endif | 176 #endif |
177 | 177 |
178 return 0; | 178 return 0; |
179 } | 179 } |
OLD | NEW |