| 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/feature_list.h" | 9 #include "base/feature_list.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "ppapi/proxy/proxy_module.h" | 25 #include "ppapi/proxy/proxy_module.h" |
| 26 #include "ui/base/ui_base_switches.h" | 26 #include "ui/base/ui_base_switches.h" |
| 27 | 27 |
| 28 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
| 29 #include "base/win/win_util.h" | 29 #include "base/win/win_util.h" |
| 30 #include "base/win/windows_version.h" | 30 #include "base/win/windows_version.h" |
| 31 #include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h" | 31 #include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h" |
| 32 #include "sandbox/win/src/sandbox.h" | 32 #include "sandbox/win/src/sandbox.h" |
| 33 #include "third_party/WebKit/public/web/win/WebFontRendering.h" | 33 #include "third_party/WebKit/public/web/win/WebFontRendering.h" |
| 34 #include "third_party/skia/include/ports/SkTypeface_win.h" | 34 #include "third_party/skia/include/ports/SkTypeface_win.h" |
| 35 #include "ui/display/win/dpi.h" |
| 35 #include "ui/gfx/win/direct_write.h" | 36 #include "ui/gfx/win/direct_write.h" |
| 36 #include "ui/gfx/win/dpi.h" | |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) |
| 40 #include "base/files/file_util.h" | 40 #include "base/files/file_util.h" |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 #if defined(OS_LINUX) | 43 #if defined(OS_LINUX) |
| 44 #include "content/public/common/sandbox_init.h" | 44 #include "content/public/common/sandbox_init.h" |
| 45 #endif | 45 #endif |
| 46 | 46 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 if (!base::win::IsUser32AndGdi32Available()) | 149 if (!base::win::IsUser32AndGdi32Available()) |
| 150 gfx::win::MaybeInitializeDirectWrite(); | 150 gfx::win::MaybeInitializeDirectWrite(); |
| 151 bool use_direct_write = gfx::win::IsDirectWriteEnabled(); | 151 bool use_direct_write = gfx::win::IsDirectWriteEnabled(); |
| 152 if (use_direct_write) { | 152 if (use_direct_write) { |
| 153 InitializeDWriteFontProxy(); | 153 InitializeDWriteFontProxy(); |
| 154 } else { | 154 } else { |
| 155 SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont); | 155 SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont); |
| 156 } | 156 } |
| 157 | 157 |
| 158 blink::WebFontRendering::setUseDirectWrite(use_direct_write); | 158 blink::WebFontRendering::setUseDirectWrite(use_direct_write); |
| 159 blink::WebFontRendering::setDeviceScaleFactor(gfx::GetDPIScale()); | 159 blink::WebFontRendering::setDeviceScaleFactor(display::win::GetDPIScale()); |
| 160 #endif | 160 #endif |
| 161 | 161 |
| 162 main_message_loop.Run(); | 162 main_message_loop.Run(); |
| 163 | 163 |
| 164 #if defined(OS_WIN) | 164 #if defined(OS_WIN) |
| 165 UninitializeDWriteFontProxy(); | 165 UninitializeDWriteFontProxy(); |
| 166 #endif | 166 #endif |
| 167 return 0; | 167 return 0; |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace content | 170 } // namespace content |
| OLD | NEW |