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

Unified Diff: content/renderer/text_input_client_observer.cc

Issue 1313553006: Implement "Look Up In Dictionary" context menu item asynchronously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/renderer/text_input_client_observer.cc
diff --git a/content/renderer/text_input_client_observer.cc b/content/renderer/text_input_client_observer.cc
index 049f87c5e025f26fdb51d285074d7d3d5f5a16ea..c3ca1df0af902eeebd2ebcafa9fa5aa1018fbba4 100644
--- a/content/renderer/text_input_client_observer.cc
+++ b/content/renderer/text_input_client_observer.cc
@@ -35,7 +35,6 @@ bool TextInputClientObserver::OnMessageReceived(const IPC::Message& message) {
OnCharacterIndexForPoint)
IPC_MESSAGE_HANDLER(TextInputClientMsg_FirstRectForCharacterRange,
OnFirstRectForCharacterRange)
- IPC_MESSAGE_HANDLER(TextInputClientMsg_StringForRange, OnStringForRange)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -86,21 +85,4 @@ void TextInputClientObserver::OnFirstRectForCharacterRange(gfx::Range range) {
Send(new TextInputClientReplyMsg_GotFirstRectForRange(routing_id(), rect));
}
-void TextInputClientObserver::OnStringForRange(gfx::Range range) {
-#if defined(OS_MACOSX)
- NSAttributedString* string = nil;
- blink::WebLocalFrame* frame = webview()->focusedFrame()->toWebLocalFrame();
- if (frame) {
- string = blink::WebSubstringUtil::attributedSubstringInRange(
- frame, range.start(), range.length());
- }
- scoped_ptr<const mac::AttributedStringCoder::EncodedString> encoded(
- mac::AttributedStringCoder::Encode(string));
- Send(new TextInputClientReplyMsg_GotStringForRange(routing_id(),
- *encoded.get()));
-#else
- NOTIMPLEMENTED();
-#endif
-}
-
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698