| 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/public/browser/browser_main_runner.h" | 5 #include "content/public/browser/browser_main_runner.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/leak_annotations.h" | 9 #include "base/debug/leak_annotations.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "content/public/common/content_switches.h" | 27 #include "content/public/common/content_switches.h" |
| 28 #include "content/public/common/main_function_params.h" | 28 #include "content/public/common/main_function_params.h" |
| 29 #include "third_party/skia/include/core/SkGraphics.h" | 29 #include "third_party/skia/include/core/SkGraphics.h" |
| 30 #include "ui/base/ime/input_method_initializer.h" | 30 #include "ui/base/ime/input_method_initializer.h" |
| 31 | 31 |
| 32 #if defined(OS_ANDROID) | 32 #if defined(OS_ANDROID) |
| 33 #include "content/browser/android/tracing_controller_android.h" | 33 #include "content/browser/android/tracing_controller_android.h" |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 #if defined(OS_WIN) | 36 #if defined(OS_WIN) |
| 37 #include "base/win/windows_version.h" | |
| 38 #include "ui/base/win/scoped_ole_initializer.h" | 37 #include "ui/base/win/scoped_ole_initializer.h" |
| 39 #include "ui/gfx/win/direct_write.h" | 38 #include "ui/gfx/win/direct_write.h" |
| 40 #endif | 39 #endif |
| 41 | 40 |
| 42 namespace content { | 41 namespace content { |
| 43 | 42 |
| 44 namespace { | 43 namespace { |
| 45 | 44 |
| 46 bool g_exited_main_message_loop = false; | 45 bool g_exited_main_message_loop = false; |
| 47 | 46 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 77 | 76 |
| 78 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); | 77 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); |
| 79 | 78 |
| 80 SkGraphics::Init(); | 79 SkGraphics::Init(); |
| 81 | 80 |
| 82 #if !defined(OS_IOS) | 81 #if !defined(OS_IOS) |
| 83 if (parameters.command_line.HasSwitch(switches::kWaitForDebugger)) | 82 if (parameters.command_line.HasSwitch(switches::kWaitForDebugger)) |
| 84 base::debug::WaitForDebugger(60, true); | 83 base::debug::WaitForDebugger(60, true); |
| 85 #endif | 84 #endif |
| 86 | 85 |
| 87 #if defined(OS_WIN) | |
| 88 if (base::win::GetVersion() < base::win::VERSION_VISTA) { | |
| 89 // When "Extend support of advanced text services to all programs" | |
| 90 // (a.k.a. Cicero Unaware Application Support; CUAS) is enabled on | |
| 91 // Windows XP and handwriting modules shipped with Office 2003 are | |
| 92 // installed, "penjpn.dll" and "skchui.dll" will be loaded and then | |
| 93 // crash unless a user installs Office 2003 SP3. To prevent these | |
| 94 // modules from being loaded, disable TSF entirely. crbug.com/160914. | |
| 95 // TODO(yukawa): Add a high-level wrapper for this instead of calling | |
| 96 // Win32 API here directly. | |
| 97 ImmDisableTextFrameService(static_cast<DWORD>(-1)); | |
| 98 } | |
| 99 #endif // OS_WIN | |
| 100 | |
| 101 base::StatisticsRecorder::Initialize(); | 86 base::StatisticsRecorder::Initialize(); |
| 102 | 87 |
| 103 notification_service_.reset(new NotificationServiceImpl); | 88 notification_service_.reset(new NotificationServiceImpl); |
| 104 | 89 |
| 105 #if defined(OS_WIN) | 90 #if defined(OS_WIN) |
| 106 // Ole must be initialized before starting message pump, so that TSF | 91 // Ole must be initialized before starting message pump, so that TSF |
| 107 // (Text Services Framework) module can interact with the message pump | 92 // (Text Services Framework) module can interact with the message pump |
| 108 // on Windows 8 Metro mode. | 93 // on Windows 8 Metro mode. |
| 109 ole_initializer_.reset(new ui::ScopedOleInitializer); | 94 ole_initializer_.reset(new ui::ScopedOleInitializer); |
| 110 // Enable DirectWrite font rendering if needed. | 95 // Enable DirectWrite font rendering if needed. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 BrowserMainRunner* BrowserMainRunner::Create() { | 232 BrowserMainRunner* BrowserMainRunner::Create() { |
| 248 return new BrowserMainRunnerImpl(); | 233 return new BrowserMainRunnerImpl(); |
| 249 } | 234 } |
| 250 | 235 |
| 251 // static | 236 // static |
| 252 bool BrowserMainRunner::ExitedMainMessageLoop() { | 237 bool BrowserMainRunner::ExitedMainMessageLoop() { |
| 253 return g_exited_main_message_loop; | 238 return g_exited_main_message_loop; |
| 254 } | 239 } |
| 255 | 240 |
| 256 } // namespace content | 241 } // namespace content |
| OLD | NEW |