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

Unified Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 2182213004: Use ChildThreadImpl::thread_safe_sender in font proxy if available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittests 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/renderer/renderer_main_platform_delegate_win.cc
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc
index 20efc6dc0319238ce80218cdc6977775b375d2c2..cf00ca2d62f87e330fe7dbb97c9cb3b3e5c5334c 100644
--- a/content/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -30,6 +30,16 @@
namespace content {
+namespace {
+
+// Helper function to cast RenderThread to IPC::Sender so we can Bind()
+// it.
+IPC::Sender* GetRenderThreadSender() {
+ return RenderThread::Get();
+}
+
+} // namespace
+
RendererMainPlatformDelegate::RendererMainPlatformDelegate(
const MainFunctionParams& parameters)
: parameters_(parameters) {}
@@ -53,7 +63,7 @@ void RendererMainPlatformDelegate::PlatformInitialize() {
// is disabled, we don't have to make this dummy call.
std::unique_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
- InitializeDWriteFontProxy();
+ InitializeDWriteFontProxy(base::Bind(&GetRenderThreadSender));
}
// TODO(robliao): This should use WebScreenInfo. See http://crbug.com/604555.
blink::WebFontRendering::setDeviceScaleFactor(display::win::GetDPIScale());

Powered by Google App Engine
This is Rietveld 408576698