| Index: content/browser/renderer_host/text_input_client_mac.h
|
| diff --git a/content/browser/renderer_host/text_input_client_mac.h b/content/browser/renderer_host/text_input_client_mac.h
|
| index d682ebdf60e6ae1eabd7084680de97b7d27aeba3..02d6014202675ffebc53944cc333144393a026fd 100644
|
| --- a/content/browser/renderer_host/text_input_client_mac.h
|
| +++ b/content/browser/renderer_host/text_input_client_mac.h
|
| @@ -73,16 +73,31 @@ class CONTENT_EXPORT TextInputClientMac {
|
|
|
| // This async method is invoked from RenderWidgetHostViewCocoa's
|
| // -quickLookWithEvent:, when the user taps a word using 3 fingers.
|
| - // The reply callback will be invoked from the IO thread, the caller is
|
| + // The reply callback will be invoked from the IO thread; the caller is
|
| // responsible for bouncing to the main thread if necessary.
|
| // The callback parameters provide the attributed word under the point and
|
| // the lower left baseline point of the text.
|
| void GetStringAtPoint(RenderWidgetHost* rwh,
|
| gfx::Point point,
|
| - void (^replyHandler)(NSAttributedString*, NSPoint));
|
| + void (^reply_handler)(NSAttributedString*, NSPoint));
|
| +
|
| // This is called on the IO thread when we get the renderer's reply for
|
| // GetStringAtPoint.
|
| - void GetStringAtPointReply(NSAttributedString*, NSPoint);
|
| + void GetStringAtPointReply(NSAttributedString* string, NSPoint point);
|
| +
|
| + // This async method is invoked when browser tries to retreive the text for
|
| + // certain range and doesn't want to wait for the reply from blink.
|
| + // The reply callback will be invoked from the IO thread; the caller is
|
| + // responsible for bouncing to the main thread if necessary.
|
| + // The callback parameters provide the attributed word under the point and
|
| + // the lower left baseline point of the text.
|
| + void GetStringFromRange(RenderWidgetHost* rwh,
|
| + NSRange range,
|
| + void (^reply_handler)(NSAttributedString*, NSPoint));
|
| +
|
| + // This is called on the IO thread when we get the renderer's reply for
|
| + // GetStringFromRange.
|
| + void GetStringFromRangeReply(NSAttributedString* string, NSPoint point);
|
|
|
| private:
|
| friend struct base::DefaultSingletonTraits<TextInputClientMac>;
|
| @@ -105,7 +120,13 @@ class CONTENT_EXPORT TextInputClientMac {
|
| base::Lock lock_;
|
| base::ConditionVariable condition_;
|
|
|
| - base::mac::ScopedBlock<void(^)(NSAttributedString*, NSPoint)> replyHandler_;
|
| + // The callback when received IPC TextInputClientReplyMsg_GotStringAtPoint.
|
| + base::mac::ScopedBlock<void(^)(NSAttributedString*, NSPoint)>
|
| + replyForPointHandler_;
|
| +
|
| + // The callback when received IPC TextInputClientReplyMsg_GotStringForRange.
|
| + base::mac::ScopedBlock<void(^)(NSAttributedString*, NSPoint)>
|
| + replyForRangeHandler_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TextInputClientMac);
|
| };
|
|
|