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

Unified Diff: content/common/dwrite_font_proxy_init_win.h

Issue 1378353006: Implementation of dwrite font proxy and removal of dwrite font cache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge to head Created 5 years, 2 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/common/dwrite_font_proxy_init_win.h
diff --git a/content/common/dwrite_font_proxy_init_win.h b/content/common/dwrite_font_proxy_init_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..a3715d1ba8c71277fa6546a39820597f6ad0deb8
--- /dev/null
+++ b/content/common/dwrite_font_proxy_init_win.h
@@ -0,0 +1,30 @@
+// Copyright 2015 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_PROXY_INIT_WIN_H_
+#define CONTENT_COMMON_DWRITE_FONT_PROXY_INIT_WIN_H_
+
+#include "base/callback.h"
+#include "content/common/content_export.h"
+#include "ipc/ipc_sender.h"
+
+namespace content {
+
+typedef IPC::Sender* (*GetSenderFn)();
jam 2015/11/03 00:18:54 we normally don't use function pointers, but inste
Ilya Kulshin 2015/11/03 18:56:22 Oops, forgot to remove the typedef.
+
+// Initializes the dwrite font proxy.
+void CONTENT_EXPORT
+InitializeDWriteFontProxy(const base::Callback<IPC::Sender*(void)>& sender);
jam 2015/11/03 00:18:54 document what the parameters are. looking at this
Ilya Kulshin 2015/11/03 18:56:21 Done.
+
+// Uninitialize the dwrite font proxy. This is safe to call even if the proxy
+// has not been initialized. After this, calls to load fonts may fail.
+void CONTENT_EXPORT UninitializeDWriteFontProxy();
jam 2015/11/03 00:18:54 why is this needed?
Ilya Kulshin 2015/11/03 18:56:21 Direct write requires that font collection and fon
jam 2015/11/09 16:32:08 i don't see the point of unregistering this before
+
+// Configures the dwrite font proxy to use the specified sender. This can be
+// useful in tests which use a fake render thread which is unable to process
+// font IPC messages. This should only be called when running as a test.
+void CONTENT_EXPORT SetDWriteFontProxyTestModeSender(IPC::Sender* sender);
+} // namespace content
+
+#endif // CONTENT_COMMON_DWRITE_FONT_PROXY_INIT_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698