| OLD | NEW |
| 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 #include <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "ipc/ipc_message_macros.h" | 12 #include "ipc/ipc_message_macros.h" |
| 13 #include "ipc/ipc_platform_file.h" |
| 13 | 14 |
| 14 #undef IPC_MESSAGE_EXPORT | 15 #undef IPC_MESSAGE_EXPORT |
| 15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 16 #define IPC_MESSAGE_START DWriteFontProxyMsgStart | 17 #define IPC_MESSAGE_START DWriteFontProxyMsgStart |
| 17 | 18 |
| 18 #ifndef CONTENT_COMMON_DWRITE_FONT_PROXY_MESSAGES_H_ | 19 #ifndef CONTENT_COMMON_DWRITE_FONT_PROXY_MESSAGES_H_ |
| 19 #define CONTENT_COMMON_DWRITE_FONT_PROXY_MESSAGES_H_ | 20 #define CONTENT_COMMON_DWRITE_FONT_PROXY_MESSAGES_H_ |
| 20 | 21 |
| 21 // The macros can't handle a complex template declaration, so we typedef it. | 22 // The macros can't handle a complex template declaration, so we typedef it. |
| 22 typedef std::pair<base::string16, base::string16> DWriteStringPair; | 23 typedef std::pair<base::string16, base::string16> DWriteStringPair; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 48 | 49 |
| 49 // Returns the list of locale and family name pairs for the font family at the | 50 // Returns the list of locale and family name pairs for the font family at the |
| 50 // specified index. | 51 // specified index. |
| 51 IPC_SYNC_MESSAGE_CONTROL1_1( | 52 IPC_SYNC_MESSAGE_CONTROL1_1( |
| 52 DWriteFontProxyMsg_GetFamilyNames, | 53 DWriteFontProxyMsg_GetFamilyNames, |
| 53 uint32_t /* family_index */, | 54 uint32_t /* family_index */, |
| 54 std::vector<DWriteStringPair> /* out family_names */) | 55 std::vector<DWriteStringPair> /* out family_names */) |
| 55 | 56 |
| 56 // Returns the list of font file paths in the system font directory that contain | 57 // Returns the list of font file paths in the system font directory that contain |
| 57 // font data for the font family at the specified index. | 58 // font data for the font family at the specified index. |
| 58 IPC_SYNC_MESSAGE_CONTROL1_1(DWriteFontProxyMsg_GetFontFiles, | 59 IPC_SYNC_MESSAGE_CONTROL1_2( |
| 59 uint32_t /* family_index */, | 60 DWriteFontProxyMsg_GetFontFiles, |
| 60 std::vector<base::string16> /* out file_paths */) | 61 uint32_t /* family_index */, |
| 62 std::vector<base::string16> /* out file_paths */, |
| 63 std::vector<IPC::PlatformFileForTransit> /* out file_handles*/) |
| 61 | 64 |
| 62 // Locates a font family that is able to render the specified text using the | 65 // Locates a font family that is able to render the specified text using the |
| 63 // specified style. If successful, the family_index and family_name will | 66 // specified style. If successful, the family_index and family_name will |
| 64 // indicate which family in the system font collection can render the requested | 67 // indicate which family in the system font collection can render the requested |
| 65 // text and the mapped_length will indicate how many characters can be | 68 // text and the mapped_length will indicate how many characters can be |
| 66 // rendered. If no font exists that can render the text, family_index will be | 69 // rendered. If no font exists that can render the text, family_index will be |
| 67 // UINT32_MAX and mapped_length will indicate how many characters cannot be | 70 // UINT32_MAX and mapped_length will indicate how many characters cannot be |
| 68 // rendered by any installed font. | 71 // rendered by any installed font. |
| 69 IPC_SYNC_MESSAGE_CONTROL5_1(DWriteFontProxyMsg_MapCharacters, | 72 IPC_SYNC_MESSAGE_CONTROL5_1(DWriteFontProxyMsg_MapCharacters, |
| 70 base::string16 /* text */, | 73 base::string16 /* text */, |
| 71 DWriteFontStyle /* font_style */, | 74 DWriteFontStyle /* font_style */, |
| 72 base::string16 /* locale_name */, | 75 base::string16 /* locale_name */, |
| 73 uint32_t /* reading_direction */, | 76 uint32_t /* reading_direction */, |
| 74 base::string16 /* base_family_name - optional */, | 77 base::string16 /* base_family_name - optional */, |
| 75 MapCharactersResult /* out */) | 78 MapCharactersResult /* out */) |
| OLD | NEW |