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

Side by Side Diff: content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h

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, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_INIT_WIN_H_ 5 #ifndef CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_INIT_WIN_H_
6 #define CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_INIT_WIN_H_ 6 #define CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_INIT_WIN_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "ipc/ipc_sender.h" 10 #include "ipc/ipc_sender.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 // Initializes the dwrite font proxy. 14 // Initializes the dwrite font proxy, using the specified callback to obtain
15 CONTENT_EXPORT void InitializeDWriteFontProxy(); 15 // the sender to be used for sending IPC messages to the browser process.
16 CONTENT_EXPORT void InitializeDWriteFontProxy(
17 const base::Callback<IPC::Sender*(void)>& sender);
16 18
17 // Uninitialize the dwrite font proxy. This is safe to call even if the proxy 19 // Uninitialize the dwrite font proxy. This is safe to call even if the proxy
18 // has not been initialized. After this, calls to load fonts may fail. 20 // has not been initialized. After this, calls to load fonts may fail.
19 CONTENT_EXPORT void UninitializeDWriteFontProxy(); 21 CONTENT_EXPORT void UninitializeDWriteFontProxy();
20 22
21 // Configures the dwrite font proxy to use the specified sender. This can be 23 // Configures the dwrite font proxy to use the specified sender. This can be
22 // useful in tests which use a fake render thread which is unable to process 24 // useful in tests which use a fake render thread which is unable to process
23 // font IPC messages. This should only be called when running as a test. 25 // font IPC messages. This should only be called when running as a test.
24 CONTENT_EXPORT void SetDWriteFontProxySenderForTesting(IPC::Sender* sender); 26 CONTENT_EXPORT void SetDWriteFontProxySenderForTesting(IPC::Sender* sender);
25 27
26 } // namespace content 28 } // namespace content
27 29
28 #endif // CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_INIT_WIN_H_ 30 #endif // CONTENT_CHILD_DWRITE_FONT_PROXY_DWRITE_FONT_PROXY_INIT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698