Chromium Code Reviews| Index: chrome/utility/font_cache_handler_win.h |
| diff --git a/chrome/utility/font_cache_handler_win.h b/chrome/utility/font_cache_handler_win.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..201f42f656f63aebc6786f26d8c3c788bc4fcc5c |
| --- /dev/null |
| +++ b/chrome/utility/font_cache_handler_win.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_UTILITY_FONT_CACHE_HANDLER_WIN_H_ |
| +#define CHROME_UTILITY_FONT_CACHE_HANDLER_WIN_H_ |
| + |
| +#include "base/files/file_path.h" |
| +#include "chrome/utility/utility_message_handler.h" |
| + |
| +// Handles requests to build static direct write font cache. Must be invoked |
|
cpu_(ooo_6.6-7.5)
2014/11/14 18:13:52
..to build a static direct ..
Shrikant Kelkar
2014/11/14 18:51:53
Done.
|
| +// in a non-sandboxed utility process. We build static font cache in utility |
| +// process as it is time consuming as well as exception prone thing. We already |
|
cpu_(ooo_6.6-7.5)
2014/11/14 18:13:52
as well as crash prone.
Shrikant Kelkar
2014/11/14 18:51:53
Done.
|
| +// have fall back of loading fonts from system fonts directory in place, so even |
| +// if we fail to build static cache in utility process, chrome will still |
| +// continue to run as is. |
| +class FontCacheHandler : public UtilityMessageHandler { |
| + public: |
| + FontCacheHandler() {} |
| + virtual ~FontCacheHandler() {} |
| + |
| + // IPC::Listener implementation |
| + virtual bool OnMessageReceived(const IPC::Message& message) override; |
| + |
| + private: |
| + void OnBuildFontCache(const base::FilePath& full_path); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(FontCacheHandler); |
| +}; |
| + |
| +#endif // CHROME_UTILITY_FONT_CACHE_HANDLER_WIN_H_ |