| 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 4e50eff5c7e39c0fc8e9227154c945ba16aa5bce..e82611f2eb95e41883a200e2eadfe60928a19a9a 100644
|
| --- a/content/browser/renderer_host/text_input_client_mac.h
|
| +++ b/content/browser/renderer_host/text_input_client_mac.h
|
| @@ -81,6 +81,19 @@ class CONTENT_EXPORT TextInputClientMac {
|
| // GetStringAtPoint.
|
| void GetStringAtPointReply(NSAttributedString*, NSPoint);
|
|
|
| + // This async method is invoked from RenderWidgetHostViewMacDictionaryHelper's
|
| + // ShowDefinitionForSelection().
|
| + // 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 (^replyHandler)(NSAttributedString*, NSPoint));
|
| + // This is called on the IO thread when we get the renderer's reply for
|
| + // GetStringFromRange.
|
| + void GetStringFromRangeReply(NSAttributedString*, NSPoint);
|
| +
|
| private:
|
| friend struct DefaultSingletonTraits<TextInputClientMac>;
|
| TextInputClientMac();
|
| @@ -102,7 +115,10 @@ class CONTENT_EXPORT TextInputClientMac {
|
| base::Lock lock_;
|
| base::ConditionVariable condition_;
|
|
|
| - base::mac::ScopedBlock<void(^)(NSAttributedString*, NSPoint)> replyHandler_;
|
| + base::mac::ScopedBlock<void(^)(NSAttributedString*, NSPoint)>
|
| + replyForPointHandler_;
|
| + base::mac::ScopedBlock<void(^)(NSAttributedString*, NSPoint)>
|
| + replyForRangeHandler_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TextInputClientMac);
|
| };
|
|
|