| Index: content/browser/renderer_host/text_input_client_message_filter.mm
|
| diff --git a/content/browser/renderer_host/text_input_client_message_filter.mm b/content/browser/renderer_host/text_input_client_message_filter.mm
|
| index 7af5a8ff2bd1d185bfbdb57307008d9f069f655f..61510511a793e7c587432ade0876bc22562e305a 100644
|
| --- a/content/browser/renderer_host/text_input_client_message_filter.mm
|
| +++ b/content/browser/renderer_host/text_input_client_message_filter.mm
|
| @@ -26,6 +26,8 @@ bool TextInputClientMessageFilter::OnMessageReceived(
|
| bool handled = true;
|
| IPC_BEGIN_MESSAGE_MAP_EX(TextInputClientMessageFilter, message,
|
| *message_was_ok)
|
| + IPC_MESSAGE_HANDLER(TextInputClientReplyMsg_GotStringAtPoint,
|
| + OnGotStringAtPoint)
|
| IPC_MESSAGE_HANDLER(TextInputClientReplyMsg_GotCharacterIndexForPoint,
|
| OnGotCharacterIndexForPoint)
|
| IPC_MESSAGE_HANDLER(TextInputClientReplyMsg_GotFirstRectForRange,
|
| @@ -39,6 +41,15 @@ bool TextInputClientMessageFilter::OnMessageReceived(
|
|
|
| TextInputClientMessageFilter::~TextInputClientMessageFilter() {}
|
|
|
| +void TextInputClientMessageFilter::OnGotStringAtPoint(
|
| + const mac::AttributedStringCoder::EncodedString& encoded_string,
|
| + const gfx::Rect& rect) {
|
| + TextInputClientMac* service = TextInputClientMac::GetInstance();
|
| + NSAttributedString* string =
|
| + mac::AttributedStringCoder::Decode(&encoded_string);
|
| + service->GetStringAtPointReply(string, NSRectFromCGRect(rect.ToCGRect()));
|
| +}
|
| +
|
| void TextInputClientMessageFilter::OnGotCharacterIndexForPoint(size_t index) {
|
| TextInputClientMac* service = TextInputClientMac::GetInstance();
|
| // |index| could be WTF::notFound (-1) and its value is different from
|
|
|