OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "app/hi_res_timer_manager.h" |
| 8 #include "app/system_monitor.h" |
7 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
8 #include "app/win_util.h" | 10 #include "app/win_util.h" |
9 #endif | 11 #endif |
10 #include "base/command_line.h" | 12 #include "base/command_line.h" |
11 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
12 #include "base/string_util.h" | 14 #include "base/string_util.h" |
13 #include "base/system_monitor.h" | |
14 #include "chrome/common/child_process.h" | 15 #include "chrome/common/child_process.h" |
15 #include "chrome/common/chrome_constants.h" | 16 #include "chrome/common/chrome_constants.h" |
16 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/logging_chrome.h" | 18 #include "chrome/common/logging_chrome.h" |
18 #include "chrome/common/main_function_params.h" | 19 #include "chrome/common/main_function_params.h" |
19 #include "chrome/plugin/plugin_thread.h" | 20 #include "chrome/plugin/plugin_thread.h" |
20 | 21 |
21 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
22 #include "chrome/test/injection_test_dll.h" | 23 #include "chrome/test/injection_test_dll.h" |
23 #include "sandbox/src/sandbox.h" | 24 #include "sandbox/src/sandbox.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // full screen mode in Flash), those windows would not receive events. | 83 // full screen mode in Flash), those windows would not receive events. |
83 // Instead, WebPluginDelegateImpl::OnNullEvent will dispatch any pending | 84 // Instead, WebPluginDelegateImpl::OnNullEvent will dispatch any pending |
84 // system events directly to the plugin. | 85 // system events directly to the plugin. |
85 MessageLoop main_message_loop(MessageLoop::TYPE_DEFAULT); | 86 MessageLoop main_message_loop(MessageLoop::TYPE_DEFAULT); |
86 #else | 87 #else |
87 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 88 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
88 #endif | 89 #endif |
89 std::wstring app_name = chrome::kBrowserAppName; | 90 std::wstring app_name = chrome::kBrowserAppName; |
90 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); | 91 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); |
91 | 92 |
92 // Initialize the SystemMonitor | 93 SystemMonitor system_monitor; |
93 base::SystemMonitor::Start(); | 94 HighResolutionTimerManager high_resolution_timer_manager; |
94 | 95 |
95 #if defined(OS_MACOSX) | 96 #if defined(OS_MACOSX) |
96 TrimInterposeEnvironment(); | 97 TrimInterposeEnvironment(); |
97 #endif | 98 #endif |
98 | 99 |
99 const CommandLine& parsed_command_line = parameters.command_line_; | 100 const CommandLine& parsed_command_line = parameters.command_line_; |
100 | 101 |
101 #if defined(OS_WIN) | 102 #if defined(OS_WIN) |
102 sandbox::TargetServices* target_services = | 103 sandbox::TargetServices* target_services = |
103 parameters.sandbox_info_.TargetServices(); | 104 parameters.sandbox_info_.TargetServices(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 152 |
152 MessageLoop::current()->Run(); | 153 MessageLoop::current()->Run(); |
153 } | 154 } |
154 | 155 |
155 #if defined(OS_WIN) | 156 #if defined(OS_WIN) |
156 CoUninitialize(); | 157 CoUninitialize(); |
157 #endif | 158 #endif |
158 | 159 |
159 return 0; | 160 return 0; |
160 } | 161 } |
OLD | NEW |