Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1437)

Unified Diff: content/browser/renderer_host/text_input_client_message_filter.mm

Issue 1318483007: Implement "Look Up In Dictionary" context menu item asynchronously. (OS X) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed asvitkine@'s comments. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/text_input_client_message_filter.mm
diff --git a/content/browser/renderer_host/text_input_client_message_filter.mm b/content/browser/renderer_host/text_input_client_message_filter.mm
index 090daaa522da775d882171ee5a52ffb623bbee36..187d7fe26e558c4be71d680721609243eb43b314 100644
--- a/content/browser/renderer_host/text_input_client_message_filter.mm
+++ b/content/browser/renderer_host/text_input_client_message_filter.mm
@@ -65,13 +65,16 @@ void TextInputClientMessageFilter::OnGotFirstRectForRange(
}
void TextInputClientMessageFilter::OnGotStringFromRange(
- const mac::AttributedStringCoder::EncodedString& encoded_string) {
+ const mac::AttributedStringCoder::EncodedString& encoded_string,
+ const gfx::Point& point) {
TextInputClientMac* service = TextInputClientMac::GetInstance();
NSAttributedString* string =
mac::AttributedStringCoder::Decode(&encoded_string);
if (![string length])
string = nil;
service->SetSubstringAndSignal(string);
Alexei Svitkine (slow) 2015/09/21 15:47:56 Can this call be merged into GetStringFromRangeRep
Shu Chen 2015/09/22 05:46:08 Done.
+ service->GetStringFromRangeReply(
+ string, NSPointFromCGPoint(point.ToCGPoint()));
Alexei Svitkine (slow) 2015/09/21 15:47:56 Does it make sense to not do this when string is e
Shu Chen 2015/09/22 05:46:08 This call is necessary when string is empty or nil
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698