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

Unified Diff: content/ppapi_plugin/ppapi_plugin_main.cc

Issue 1523053004: Remove unneeded code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dwfontrevert2
Patch Set: Created 5 years 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
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/common/dwrite_font_platform_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_plugin_main.cc
diff --git a/content/ppapi_plugin/ppapi_plugin_main.cc b/content/ppapi_plugin/ppapi_plugin_main.cc
index 52f87a5e8ece396be9f15a9d8558ed1fa309adb1..c91633972cd6a0926edb994929d6ed78b8a07422 100644
--- a/content/ppapi_plugin/ppapi_plugin_main.cc
+++ b/content/ppapi_plugin/ppapi_plugin_main.cc
@@ -20,6 +20,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "content/public/plugin/content_plugin_client.h"
+#include "ipc/ipc_sender.h"
#include "ppapi/proxy/plugin_globals.h"
#include "ppapi/proxy/proxy_module.h"
#include "ui/base/ui_base_switches.h"
@@ -27,7 +28,7 @@
#if defined(OS_WIN)
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
-#include "content/common/font_warmup_win.h"
+#include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h"
#include "sandbox/win/src/sandbox.h"
#include "third_party/WebKit/public/web/win/WebFontRendering.h"
#include "third_party/skia/include/ports/SkTypeface_win.h"
@@ -65,6 +66,12 @@ void SkiaPreCacheFont(const LOGFONT& logfont) {
}
#endif
+// Helper function so that we can Bind() GetBrowserSender. We can't bind it
+// as a member function because PluginGlobals is not ref counted.
+IPC::Sender* GetPluginGlobalsSender() {
+ return ppapi::proxy::PluginGlobals::Get()->GetBrowserSender();
+}
+
} // namespace
// Main function for starting the PPAPI plugin process.
@@ -139,7 +146,7 @@ int PpapiPluginMain(const MainFunctionParams& parameters) {
gfx::win::MaybeInitializeDirectWrite();
bool use_direct_write = gfx::win::IsDirectWriteEnabled();
if (use_direct_write) {
- WarmupDirectWrite();
+ InitializeDWriteFontProxy(base::Bind(&GetPluginGlobalsSender));
} else {
SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont);
}
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/common/dwrite_font_platform_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698