Index: content/browser/renderer_host/text_input_client_mac.mm |
diff --git a/content/browser/renderer_host/text_input_client_mac.mm b/content/browser/renderer_host/text_input_client_mac.mm |
index b9d900a704ea47ca047bce8d9220ab57c744eaf7..131ab92b1e3fff2bc76da00d982cdc4ca4d9032b 100644 |
--- a/content/browser/renderer_host/text_input_client_mac.mm |
+++ b/content/browser/renderer_host/text_input_client_mac.mm |
@@ -33,6 +33,24 @@ TextInputClientMac* TextInputClientMac::GetInstance() { |
return Singleton<TextInputClientMac>::get(); |
} |
+void TextInputClientMac::GetStringAtPoint( |
+ RenderWidgetHost* rwh, |
+ gfx::Point point, |
+ void (^replyHandler)(NSAttributedString*, NSPoint)) { |
+ DCHECK(replyHandler_.get() == nil); |
+ replyHandler_.reset(replyHandler, base::scoped_policy::RETAIN); |
+ RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); |
+ rwhi->Send(new TextInputClientMsg_StringAtPoint(rwhi->GetRoutingID(), point)); |
+} |
+ |
+void TextInputClientMac::GetStringAtPointReply(NSAttributedString* string, |
+ NSPoint point) { |
+ if (replyHandler_.get()) { |
+ replyHandler_.get()(string, point); |
+ replyHandler_.reset(); |
+ } |
+} |
+ |
NSUInteger TextInputClientMac::GetCharacterIndexAtPoint(RenderWidgetHost* rwh, |
gfx::Point point) { |
base::TimeTicks start = base::TimeTicks::Now(); |