Index: content/test/dwrite_font_fake_sender_win.cc |
diff --git a/content/test/dwrite_font_fake_sender_win.cc b/content/test/dwrite_font_fake_sender_win.cc |
index 62f5fed40817a6c37bf83753b8c6454fe3f5f892..b17f1ae4ca12011c07249dd83f6441fc10735d19 100644 |
--- a/content/test/dwrite_font_fake_sender_win.cc |
+++ b/content/test/dwrite_font_fake_sender_win.cc |
@@ -4,6 +4,7 @@ |
#include "content/test/dwrite_font_fake_sender_win.h" |
+#include <dwrite.h> |
#include <shlobj.h> |
#include "content/common/dwrite_font_proxy_messages.h" |
@@ -77,6 +78,7 @@ FakeFontCollection::ReplySender::OnMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(DWriteFontProxyMsg_GetFamilyCount, OnGetFamilyCount) |
IPC_MESSAGE_HANDLER(DWriteFontProxyMsg_GetFamilyNames, OnGetFamilyNames) |
IPC_MESSAGE_HANDLER(DWriteFontProxyMsg_GetFontFiles, OnGetFontFiles) |
+ IPC_MESSAGE_HANDLER(DWriteFontProxyMsg_MapCharacters, OnMapCharacters) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
return reply_; |
@@ -109,6 +111,17 @@ void FakeFontCollection::ReplySender::OnGetFontFiles( |
collection_->OnGetFontFiles(family_index, file_paths); |
} |
+void FakeFontCollection::ReplySender::OnMapCharacters( |
+ const base::string16& text, |
+ const DWriteFontStyle& font_style, |
+ const base::string16& locale_name, |
+ uint32_t reading_direction, |
+ const base::string16& base_family_name, |
+ MapCharactersResult* result) { |
+ collection_->OnMapCharacters(text, font_style, locale_name, reading_direction, |
+ base_family_name, result); |
+} |
+ |
FakeFontCollection::FakeSender::FakeSender(FakeFontCollection* collection, |
bool track_messages) |
: track_messages_(track_messages), collection_(collection) {} |
@@ -163,6 +176,21 @@ void FakeFontCollection::OnGetFontFiles( |
*file_paths = fonts_[family_index].file_paths_; |
} |
+void FakeFontCollection::OnMapCharacters(const base::string16& text, |
+ const DWriteFontStyle& font_style, |
+ const base::string16& locale_name, |
+ uint32_t reading_direction, |
+ const base::string16& base_family_name, |
+ MapCharactersResult* result) { |
+ result->family_index = 0; |
+ result->family_name = fonts_[0].FontName(); |
+ result->mapped_length = 1; |
+ result->scale = 1.0; |
+ result->font_style.font_weight = DWRITE_FONT_WEIGHT_NORMAL; |
+ result->font_style.font_slant = DWRITE_FONT_STYLE_NORMAL; |
+ result->font_style.font_stretch = DWRITE_FONT_STRETCH_NORMAL; |
+} |
+ |
std::unique_ptr<FakeFontCollection::ReplySender> |
FakeFontCollection::GetReplySender() { |
return std::unique_ptr<FakeFontCollection::ReplySender>( |