OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/utility/utility_thread_impl.h" | 5 #include "content/utility/utility_thread_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 if (!batch_mode_) | 55 if (!batch_mode_) |
56 ChildProcess::current()->ReleaseProcess(); | 56 ChildProcess::current()->ReleaseProcess(); |
57 } | 57 } |
58 | 58 |
59 #if defined(OS_WIN) | 59 #if defined(OS_WIN) |
60 | 60 |
61 void UtilityThreadImpl::PreCacheFont(const LOGFONT& log_font) { | 61 void UtilityThreadImpl::PreCacheFont(const LOGFONT& log_font) { |
62 Send(new ChildProcessHostMsg_PreCacheFont(log_font)); | 62 Send(new ChildProcessHostMsg_PreCacheFont(log_font)); |
63 } | 63 } |
64 | 64 |
| 65 void UtilityThreadImpl::PreCacheFontCharacters(const LOGFONT& log_font, |
| 66 const std::wstring& str) { |
| 67 Send(new ChildProcessHostMsg_PreCacheFontCharacters(log_font, str)); |
| 68 } |
| 69 |
65 void UtilityThreadImpl::ReleaseCachedFonts() { | 70 void UtilityThreadImpl::ReleaseCachedFonts() { |
66 Send(new ChildProcessHostMsg_ReleaseCachedFonts()); | 71 Send(new ChildProcessHostMsg_ReleaseCachedFonts()); |
67 } | 72 } |
68 | 73 |
69 #endif // OS_WIN | 74 #endif // OS_WIN |
70 | 75 |
71 | 76 |
72 bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { | 77 bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { |
73 if (content::GetContentClient()->utility()->OnMessageReceived(msg)) | 78 if (content::GetContentClient()->utility()->OnMessageReceived(msg)) |
74 return true; | 79 return true; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 if (!plugin_list->LoadPluginIntoPluginList( | 126 if (!plugin_list->LoadPluginIntoPluginList( |
122 plugin_paths[i], &plugins, &plugin)) | 127 plugin_paths[i], &plugins, &plugin)) |
123 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); | 128 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); |
124 else | 129 else |
125 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); | 130 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); |
126 } | 131 } |
127 | 132 |
128 ReleaseProcessIfNeeded(); | 133 ReleaseProcessIfNeeded(); |
129 } | 134 } |
130 #endif | 135 #endif |
OLD | NEW |