| 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 "base/base_paths.h" | 5 #include "base/base_paths.h" | 
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" | 
| 7 #include "base/debug/crash_logging.h" | 7 #include "base/debug/crash_logging.h" | 
| 8 #include "base/debug/debugger.h" | 8 #include "base/debug/debugger.h" | 
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" | 
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 25 #include "ui/base/ui_base_switches.h" | 25 #include "ui/base/ui_base_switches.h" | 
| 26 | 26 | 
| 27 #if defined(OS_WIN) | 27 #if defined(OS_WIN) | 
| 28 #include "base/win/win_util.h" | 28 #include "base/win/win_util.h" | 
| 29 #include "base/win/windows_version.h" | 29 #include "base/win/windows_version.h" | 
| 30 #include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h" | 30 #include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h" | 
| 31 #include "sandbox/win/src/sandbox.h" | 31 #include "sandbox/win/src/sandbox.h" | 
| 32 #include "third_party/WebKit/public/web/win/WebFontRendering.h" | 32 #include "third_party/WebKit/public/web/win/WebFontRendering.h" | 
| 33 #include "third_party/skia/include/ports/SkTypeface_win.h" | 33 #include "third_party/skia/include/ports/SkTypeface_win.h" | 
| 34 #include "ui/display/win/dpi.h" | 34 #include "ui/display/win/dpi.h" | 
|  | 35 #include "ui/gfx/font_render_params.h" | 
| 35 #include "ui/gfx/win/direct_write.h" | 36 #include "ui/gfx/win/direct_write.h" | 
| 36 #endif | 37 #endif | 
| 37 | 38 | 
| 38 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) | 
| 39 #include "base/files/file_util.h" | 40 #include "base/files/file_util.h" | 
| 40 #endif | 41 #endif | 
| 41 | 42 | 
| 42 #if defined(OS_LINUX) | 43 #if defined(OS_LINUX) | 
| 43 #include "content/public/common/sandbox_init.h" | 44 #include "content/public/common/sandbox_init.h" | 
| 44 #endif | 45 #endif | 
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 125   ChildProcess ppapi_process; | 126   ChildProcess ppapi_process; | 
| 126   ppapi_process.set_main_thread( | 127   ppapi_process.set_main_thread( | 
| 127       new PpapiThread(parameters.command_line, false));  // Not a broker. | 128       new PpapiThread(parameters.command_line, false));  // Not a broker. | 
| 128 | 129 | 
| 129 #if defined(OS_WIN) | 130 #if defined(OS_WIN) | 
| 130   if (!base::win::IsUser32AndGdi32Available()) | 131   if (!base::win::IsUser32AndGdi32Available()) | 
| 131     gfx::win::MaybeInitializeDirectWrite(); | 132     gfx::win::MaybeInitializeDirectWrite(); | 
| 132   InitializeDWriteFontProxy(); | 133   InitializeDWriteFontProxy(); | 
| 133 | 134 | 
| 134   blink::WebFontRendering::setDeviceScaleFactor(display::win::GetDPIScale()); | 135   blink::WebFontRendering::setDeviceScaleFactor(display::win::GetDPIScale()); | 
|  | 136 | 
|  | 137   const gfx::FontRenderParams font_params = | 
|  | 138       gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr); | 
|  | 139   blink::WebFontRendering::setAntialiasedTextEnabled(font_params.antialiasing); | 
|  | 140   blink::WebFontRendering::setLCDTextEnabled( | 
|  | 141       font_params.subpixel_rendering != | 
|  | 142       gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE); | 
| 135 #endif | 143 #endif | 
| 136 | 144 | 
| 137   main_message_loop.Run(); | 145   main_message_loop.Run(); | 
| 138 | 146 | 
| 139 #if defined(OS_WIN) | 147 #if defined(OS_WIN) | 
| 140   UninitializeDWriteFontProxy(); | 148   UninitializeDWriteFontProxy(); | 
| 141 #endif | 149 #endif | 
| 142   return 0; | 150   return 0; | 
| 143 } | 151 } | 
| 144 | 152 | 
| 145 }  // namespace content | 153 }  // namespace content | 
| OLD | NEW | 
|---|