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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/mac/bundle_locations.h" | 7 #include "base/mac/bundle_locations.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "content/shell/app/blink_test_platform_support.h" | 10 #include "content/shell/app/blink_test_platform_support.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 [font_urls addObject:[font_url absoluteURL]]; | 76 [font_urls addObject:[font_url absoluteURL]]; |
77 } | 77 } |
78 | 78 |
79 CFArrayRef errors = 0; | 79 CFArrayRef errors = 0; |
80 if (!CTFontManagerRegisterFontsForURLs((CFArrayRef)font_urls, | 80 if (!CTFontManagerRegisterFontsForURLs((CFArrayRef)font_urls, |
81 kCTFontManagerScopeProcess, | 81 kCTFontManagerScopeProcess, |
82 &errors)) { | 82 &errors)) { |
83 DLOG(FATAL) << "Fail to activate fonts."; | 83 DLOG(FATAL) << "Fail to activate fonts."; |
84 CFRelease(errors); | 84 CFRelease(errors); |
85 } | 85 } |
86 | |
87 // Add <app bundle's parent dir>/plugins to the plugin path so we can load | |
88 // test npapi plugins (soon to be removed). | |
89 const char kExtraPluginDir[] = "extra-plugin-dir"; | |
90 base::FilePath plugins_dir; | |
91 PathService::Get(base::DIR_EXE, &plugins_dir); | |
92 plugins_dir = plugins_dir.AppendASCII("../../../plugins"); | |
93 base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); | |
94 command_line.AppendSwitchPath(kExtraPluginDir, plugins_dir); | |
95 | |
96 return true; | 86 return true; |
97 } | 87 } |
98 | 88 |
99 } // namespace content | 89 } // namespace content |
OLD | NEW |