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

Unified Diff: content/public/child/child_thread.h

Issue 897563002: Unify the three places that patch font loading for PDFium on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/public/child/child_thread.h
diff --git a/content/public/child/child_thread.h b/content/public/child/child_thread.h
new file mode 100644
index 0000000000000000000000000000000000000000..e3df72ca89762f6ced867e8d4726e8479fd6eed1
--- /dev/null
+++ b/content/public/child/child_thread.h
@@ -0,0 +1,37 @@
+// 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_PUBLIC_CHILD_THREAD_H_
+#define CONTENT_PUBLIC_CHILD_THREAD_H_
+
+#include "content/common/content_export.h"
+#include "ipc/ipc_sender.h"
+
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
+namespace content {
+
+class CONTENT_EXPORT ChildThread : public IPC::Sender {
+ public:
+ // Returns the one child thread for this process. Note that this can only be
+ // accessed when running on the child thread itself.
+ static ChildThread* Get();
+
+ ~ChildThread() override {}
+
+#if defined(OS_WIN)
+ // Request that the given font be loaded by the browser so it's cached by the
+ // OS. Please see ChildProcessHost::PreCacheFont for details.
+ virtual void PreCacheFont(const LOGFONT& log_font) = 0;
+
+ // Release cached font.
+ virtual void ReleaseCachedFonts() = 0;
+#endif
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_CHILD_THREAD_H_

Powered by Google App Engine
This is Rietveld 408576698