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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2330423002: Fix invalid suggestion window position on ChromeOS and Windwos. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 bool did_update_state) { 2959 bool did_update_state) {
2960 DCHECK_EQ(text_input_manager_, text_input_manager); 2960 DCHECK_EQ(text_input_manager_, text_input_manager);
2961 2961
2962 if (!GetInputMethod()) 2962 if (!GetInputMethod())
2963 return; 2963 return;
2964 2964
2965 if (did_update_state) 2965 if (did_update_state)
2966 GetInputMethod()->OnTextInputTypeChanged(this); 2966 GetInputMethod()->OnTextInputTypeChanged(this);
2967 2967
2968 const TextInputState* state = text_input_manager_->GetTextInputState(); 2968 const TextInputState* state = text_input_manager_->GetTextInputState();
2969 if (state && state->show_ime_if_needed && 2969 if (state && state->show_ime_if_needed)
2970 state->type != ui::TEXT_INPUT_TYPE_NONE) {
2971 GetInputMethod()->ShowImeIfNeeded(); 2970 GetInputMethod()->ShowImeIfNeeded();
2971
2972
2973 if (state && state->type != ui::TEXT_INPUT_TYPE_NONE) {
2972 // Start monitoring the composition information if the focused node is 2974 // Start monitoring the composition information if the focused node is
2973 // editable. 2975 // editable.
2974 RenderWidgetHostImpl* last_active_widget = 2976 RenderWidgetHostImpl* last_active_widget =
2975 text_input_manager_->GetActiveWidget(); 2977 text_input_manager_->GetActiveWidget();
2976 last_active_widget_routing_id_ = last_active_widget->GetRoutingID(); 2978 last_active_widget_routing_id_ = last_active_widget->GetRoutingID();
2977 last_active_widget_process_id_ = last_active_widget->GetProcess()->GetID(); 2979 last_active_widget_process_id_ = last_active_widget->GetProcess()->GetID();
2978 last_active_widget->Send(new InputMsg_RequestCompositionUpdate( 2980 last_active_widget->Send(new InputMsg_RequestCompositionUpdate(
2979 last_active_widget->GetRoutingID(), false /* immediate request */, 2981 last_active_widget->GetRoutingID(), false /* immediate request */,
2980 true /* monitor request */)); 2982 true /* monitor request */));
2981 } else { 2983 } else {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
3037 ->GetTextSelection(focused_view) 3039 ->GetTextSelection(focused_view)
3038 ->GetSelectedText(&selected_text)) { 3040 ->GetSelectedText(&selected_text)) {
3039 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. 3041 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard.
3040 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION); 3042 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION);
3041 clipboard_writer.WriteText(selected_text); 3043 clipboard_writer.WriteText(selected_text);
3042 } 3044 }
3043 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) 3045 #endif // defined(USE_X11) && !defined(OS_CHROMEOS)
3044 } 3046 }
3045 3047
3046 } // namespace content 3048 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698