| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shell/app/blink_test_platform_support.h" | 5 #include "content/shell/app/blink_test_platform_support.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <iostream> | 8 #include <iostream> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 ::AddFontMemResourceEx(const_cast<char*>(font_buffer.c_str()), | 54 ::AddFontMemResourceEx(const_cast<char*>(font_buffer.c_str()), |
| 55 font_buffer.length(), | 55 font_buffer.length(), |
| 56 0, | 56 0, |
| 57 &num_fonts); | 57 &num_fonts); |
| 58 if (!font_handle) { | 58 if (!font_handle) { |
| 59 std::cerr << "Failed to register Ahem font\n"; | 59 std::cerr << "Failed to register Ahem font\n"; |
| 60 return false; | 60 return false; |
| 61 } | 61 } |
| 62 | 62 |
| 63 // DirectWrite sandbox registration. | 63 // DirectWrite sandbox registration. |
| 64 CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); | 64 base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); |
| 65 command_line.AppendSwitchASCII(switches::kRegisterFontFiles, | 65 command_line.AppendSwitchASCII(switches::kRegisterFontFiles, |
| 66 base::WideToUTF8(font_path.value())); | 66 base::WideToUTF8(font_path.value())); |
| 67 | 67 |
| 68 return true; | 68 return true; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace | 71 } // namespace |
| 72 | 72 |
| 73 bool CheckLayoutSystemDeps() { | 73 bool CheckLayoutSystemDeps() { |
| 74 std::list<std::string> errors; | 74 std::list<std::string> errors; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 std::cerr << *it << "\n"; | 108 std::cerr << *it << "\n"; |
| 109 } | 109 } |
| 110 return errors.empty(); | 110 return errors.empty(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 bool BlinkTestPlatformInitialize() { | 113 bool BlinkTestPlatformInitialize() { |
| 114 return SetupFonts(); | 114 return SetupFonts(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace content | 117 } // namespace content |
| OLD | NEW |