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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2694543002: [refactor] Cleanup IME State in RenderWidgetHostViewMac which is already tracked by TextInputManager (Closed)
Patch Set: Fixed another compile error for Android test Created 3 years, 10 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index f2c74b3ada76d054334b08a09c6bfb3e2d7fc7d1..6e43c6971c1490705e715cc5a7742faf7b8b0808 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -765,14 +765,9 @@ void RenderWidgetHostViewAndroid::OnTextSelectionChanged(
const TextInputManager::TextSelection& selection =
*text_input_manager_->GetTextSelection(focused_widget->GetView());
- if (selection.range.is_empty()) {
- content_view_core_->OnSelectionChanged("");
- return;
- }
- base::string16 selected_text;
- if (selection.GetSelectedText(&selected_text))
- content_view_core_->OnSelectionChanged(base::UTF16ToUTF8(selected_text));
+ content_view_core_->OnSelectionChanged(
+ base::UTF16ToUTF8(selection.selected_text()));
}
void RenderWidgetHostViewAndroid::UpdateBackgroundColor(SkColor color) {
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698