Chromium Code Reviews| 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)); |
|
Alexei Svitkine (slow)
2015/09/18 16:48:43
replyHandler -> reply_handler
Shu Chen
2015/09/21 02:47:39
Done.
|
| + // This is called on the IO thread when we get the renderer's reply for |
|
Alexei Svitkine (slow)
2015/09/18 16:48:43
Add an empty line above this.
Shu Chen
2015/09/21 02:47:39
Done.
|
| + // GetStringFromRange. |
| + void GetStringFromRangeReply(NSAttributedString*, NSPoint); |
|
Alexei Svitkine (slow)
2015/09/18 16:48:43
Name the params.
Shu Chen
2015/09/21 02:47:39
Done.
|
| + |
| 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)> |
|
Alexei Svitkine (slow)
2015/09/18 16:48:43
Add comments.
Shu Chen
2015/09/21 02:47:39
Done.
|
| + replyForPointHandler_; |
| + base::mac::ScopedBlock<void(^)(NSAttributedString*, NSPoint)> |
| + replyForRangeHandler_; |
| DISALLOW_COPY_AND_ASSIGN(TextInputClientMac); |
| }; |