| 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..35fac9a4d25caf3ca148ce4de05e3780b5e7482f 100644
|
| --- a/content/browser/renderer_host/text_input_client_mac.mm
|
| +++ b/content/browser/renderer_host/text_input_client_mac.mm
|
| @@ -22,7 +22,8 @@ const float kWaitTimeout = 1500;
|
| TextInputClientMac::TextInputClientMac()
|
| : character_index_(NSNotFound),
|
| lock_(),
|
| - condition_(&lock_) {
|
| + condition_(&lock_),
|
| + replyHandler_(nil) {
|
| }
|
|
|
| TextInputClientMac::~TextInputClientMac() {
|
| @@ -33,6 +34,26 @@ TextInputClientMac* TextInputClientMac::GetInstance() {
|
| return Singleton<TextInputClientMac>::get();
|
| }
|
|
|
| +void TextInputClientMac::GetStringAtPoint(RenderWidgetHost* rwh,
|
| + gfx::Point point,
|
| + void (^replyHandler)(NSAttributedString*, NSRect)) {
|
| + RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh);
|
| + rwhi->Send(new TextInputClientMsg_StringAtPoint(rwhi->GetRoutingID(),
|
| + point));
|
| + if (replyHandler_ != nil)
|
| + [replyHandler_ release];
|
| + replyHandler_ = [replyHandler copy];
|
| +}
|
| +
|
| +void TextInputClientMac::GetStringAtPointReply(NSAttributedString* string,
|
| + NSRect rect) {
|
| + if (replyHandler_ != nil) {
|
| + replyHandler_(string, rect);
|
| + [replyHandler_ release];
|
| + replyHandler_ = nil;
|
| + }
|
| +}
|
| +
|
| NSUInteger TextInputClientMac::GetCharacterIndexAtPoint(RenderWidgetHost* rwh,
|
| gfx::Point point) {
|
| base::TimeTicks start = base::TimeTicks::Now();
|
|
|