| Index: chrome/utility/font_cache_handler_win.cc
|
| diff --git a/chrome/utility/font_cache_handler_win.cc b/chrome/utility/font_cache_handler_win.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8f83742654324a555ab043b2e54ab2e224e6029a
|
| --- /dev/null
|
| +++ b/chrome/utility/font_cache_handler_win.cc
|
| @@ -0,0 +1,27 @@
|
| +// 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.
|
| +
|
| +#include "chrome/utility/font_cache_handler_win.h"
|
| +
|
| +#include "chrome/common/chrome_utility_messages.h"
|
| +#include "content/public/common/dwrite_font_platform_win.h"
|
| +#include "content/public/utility/utility_thread.h"
|
| +
|
| +FontCacheHandler::FontCacheHandler() {}
|
| +FontCacheHandler::~FontCacheHandler() {}
|
| +
|
| +bool FontCacheHandler::OnMessageReceived(const IPC::Message& message) {
|
| + bool handled = true;
|
| + IPC_BEGIN_MESSAGE_MAP(FontCacheHandler, message)
|
| + IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_BuildDirectWriteFontCache,
|
| + OnBuildFontCache)
|
| + IPC_MESSAGE_UNHANDLED(handled = false)
|
| + IPC_END_MESSAGE_MAP()
|
| + return handled;
|
| +}
|
| +
|
| +void FontCacheHandler::OnBuildFontCache(const base::FilePath& full_path) {
|
| + content::BuildFontCache(full_path);
|
| + content::UtilityThread::Get()->ReleaseProcessIfNeeded();
|
| +}
|
|
|