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..ef60d90289de938b4640c23e7df1a89204dfaa8d 100644 |
--- a/content/browser/renderer_host/text_input_client_mac.h |
+++ b/content/browser/renderer_host/text_input_client_mac.h |
@@ -79,11 +79,25 @@ class CONTENT_EXPORT TextInputClientMac { |
// 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 |
Alexei Svitkine (slow)
2015/09/21 15:47:55
Nit: Add an empty line before this for consistency
Shu Chen
2015/09/22 05:46:08
Done.
|
// GetStringAtPoint. |
void GetStringAtPointReply(NSAttributedString*, NSPoint); |
Alexei Svitkine (slow)
2015/09/21 15:47:55
Nit: Can you name these params too?
Shu Chen
2015/09/22 05:46:08
Done.
|
+ // This async method is invoked from RenderWidgetHostViewMacDictionaryHelper's |
+ // ShowDefinitionForSelection(). |
Alexei Svitkine (slow)
2015/09/21 15:47:55
This comment is referencing code outside content/
Shu Chen
2015/09/22 05:46:08
I don't understand. RenderWidgetHostViewMacDiction
|
+ // The reply callback will be invoked from the IO thread, the caller is |
Alexei Svitkine (slow)
2015/09/21 15:47:56
Nit: , -> ;
Also make the same change for the com
Shu Chen
2015/09/22 05:46:08
Done.
|
+ // 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>; |
TextInputClientMac(); |
@@ -105,7 +119,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); |
}; |