| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_UTILITY_FONT_CACHE_HANDLER_WIN_H_ | |
| 6 #define CHROME_UTILITY_FONT_CACHE_HANDLER_WIN_H_ | |
| 7 | |
| 8 #include "base/files/file_path.h" | |
| 9 #include "chrome/utility/utility_message_handler.h" | |
| 10 | |
| 11 // Handles requests to build a static direct write font cache. Must be invoked | |
| 12 // in a non-sandboxed utility process. We build static font cache in utility | |
| 13 // process as it is time consuming as well as crash prone thing. We already | |
| 14 // have fall back of loading fonts from system fonts directory in place, so even | |
| 15 // if we fail to build static cache in utility process, chrome will still | |
| 16 // continue to run as is. | |
| 17 class FontCacheHandler : public UtilityMessageHandler { | |
| 18 public: | |
| 19 FontCacheHandler() {} | |
| 20 virtual ~FontCacheHandler() {} | |
| 21 | |
| 22 // IPC::Listener implementation | |
| 23 virtual bool OnMessageReceived(const IPC::Message& message) override; | |
| 24 | |
| 25 private: | |
| 26 void OnBuildFontCache(const base::FilePath& full_path); | |
| 27 | |
| 28 DISALLOW_COPY_AND_ASSIGN(FontCacheHandler); | |
| 29 }; | |
| 30 | |
| 31 #endif // CHROME_UTILITY_FONT_CACHE_HANDLER_WIN_H_ | |
| OLD | NEW |