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

Unified Diff: content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h

Issue 2153343002: Implement support for loading font files from outside system directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test patchset to run try job Created 4 years, 5 months 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/browser/renderer_host/dwrite_font_proxy_message_filter_win.h
diff --git a/content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h b/content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h
index 7539ff16f6b4a9a22b48b0a4a944747efa672f99..03be0fbf7dce0891396dffeb48df694384071245 100644
--- a/content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h
+++ b/content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h
@@ -37,6 +37,8 @@ class CONTENT_EXPORT DWriteFontProxyMessageFilter
void OverrideThreadForMessage(const IPC::Message& message,
content::BrowserThread::ID* thread) override;
+ void SetWindowsFontsPathForTesting(base::string16 path);
+
protected:
~DWriteFontProxyMessageFilter() override;
@@ -46,7 +48,8 @@ class CONTENT_EXPORT DWriteFontProxyMessageFilter
UINT32 family_index,
std::vector<std::pair<base::string16, base::string16>>* family_names);
void OnGetFontFiles(UINT32 family_index,
- std::vector<base::string16>* file_paths);
+ std::vector<base::string16>* file_paths,
+ std::vector<uint32_t>* file_handles);
void OnMapCharacters(const base::string16& text,
const DWriteFontStyle& font_style,
const base::string16& locale_name,
@@ -57,10 +60,14 @@ class CONTENT_EXPORT DWriteFontProxyMessageFilter
void InitializeDirectWrite();
private:
- bool AddFilesForFont(std::set<base::string16>* path_set, IDWriteFont* font);
+ bool AddFilesForFont(std::set<base::string16>* path_set,
+ std::set<base::string16>* custom_font_path_set,
+ IDWriteFont* font);
bool AddLocalFile(std::set<base::string16>* path_set,
+ std::set<base::string16>* custom_font_path_set,
IDWriteLocalFontFileLoader* local_loader,
IDWriteFontFile* font_file);
+ HANDLE CreateRendererHandleForPath(const base::string16& path);
bool IsLastResortFallbackFont(uint32_t font_index);

Powered by Google App Engine
This is Rietveld 408576698