Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: content/common/dwrite_font_platform_win.h

Issue 729103002: Revert of DirectWrite Font Cache browser side hookup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/dwrite_font_platform_win.h
diff --git a/content/common/dwrite_font_platform_win.h b/content/common/dwrite_font_platform_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..ea5a52fd90d5c4a172237d7250c04788b18d8efe
--- /dev/null
+++ b/content/common/dwrite_font_platform_win.h
@@ -0,0 +1,38 @@
+// 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 CONTENT_COMMON_DWRITE_FONT_PLATFORM_WIN_H_
+#define CONTENT_COMMON_DWRITE_FONT_PLATFORM_WIN_H_
+
+#include "base/files/file.h"
+#include "content/common/content_export.h"
+
+struct IDWriteFactory;
+struct IDWriteFontCollection;
+
+namespace content {
+
+// Function returns custom font collection in terms of IDWriteFontCollection.
+// This function maintains singleton instance of font collection and returns
+// it on repeated calls.
+CONTENT_EXPORT IDWriteFontCollection* GetCustomFontCollection(
+ IDWriteFactory* factory);
+
+// Build and load is to accomplish both tasks of creating a font cache within
+// specified file and then loading it, where loading means creating
+// readonly shared memory mapping. As this function need to iterate through all
+// available fonts in the system, it may take a while.
+CONTENT_EXPORT bool BuildAndLoadFontCache(const base::FilePath& file);
+
+// Loads font cache from file. This is supposed to be used from browser
+// side where loading means creating readonly shared memory file mapping so that
+// renderers can read from it.
+CONTENT_EXPORT bool LoadFontCache(const base::FilePath& path);
+
+// Added in header mainly for unittest
+CONTENT_EXPORT bool ValidateFontCacheFile(base::File* file);
+
+} // namespace content
+
+#endif // CONTENT_COMMON_DWRITE_FONT_PLATFORM_WIN_H_
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/dwrite_font_platform_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698