| OLD | NEW |
| 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 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 text_input_manager_->GetActiveWidget()->ImeCancelComposition(); | 1191 text_input_manager_->GetActiveWidget()->ImeCancelComposition(); |
| 1192 has_composition_text_ = false; | 1192 has_composition_text_ = false; |
| 1193 } | 1193 } |
| 1194 | 1194 |
| 1195 void RenderWidgetHostViewAura::InsertText(const base::string16& text) { | 1195 void RenderWidgetHostViewAura::InsertText(const base::string16& text) { |
| 1196 DCHECK_NE(GetTextInputType(), ui::TEXT_INPUT_TYPE_NONE); | 1196 DCHECK_NE(GetTextInputType(), ui::TEXT_INPUT_TYPE_NONE); |
| 1197 | 1197 |
| 1198 if (text_input_manager_ && text_input_manager_->GetActiveWidget()) { | 1198 if (text_input_manager_ && text_input_manager_->GetActiveWidget()) { |
| 1199 if (text.length()) | 1199 if (text.length()) |
| 1200 text_input_manager_->GetActiveWidget()->ImeCommitText( | 1200 text_input_manager_->GetActiveWidget()->ImeCommitText( |
| 1201 text, gfx::Range::InvalidRange(), 0); | 1201 text, std::vector<blink::WebCompositionUnderline>(), |
| 1202 gfx::Range::InvalidRange(), 0); |
| 1202 else if (has_composition_text_) | 1203 else if (has_composition_text_) |
| 1203 text_input_manager_->GetActiveWidget()->ImeFinishComposingText(false); | 1204 text_input_manager_->GetActiveWidget()->ImeFinishComposingText(false); |
| 1204 } | 1205 } |
| 1205 has_composition_text_ = false; | 1206 has_composition_text_ = false; |
| 1206 } | 1207 } |
| 1207 | 1208 |
| 1208 void RenderWidgetHostViewAura::InsertChar(const ui::KeyEvent& event) { | 1209 void RenderWidgetHostViewAura::InsertChar(const ui::KeyEvent& event) { |
| 1209 if (popup_child_host_view_ && popup_child_host_view_->NeedsInputGrab()) { | 1210 if (popup_child_host_view_ && popup_child_host_view_->NeedsInputGrab()) { |
| 1210 popup_child_host_view_->InsertChar(event); | 1211 popup_child_host_view_->InsertChar(event); |
| 1211 return; | 1212 return; |
| (...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2394 | 2395 |
| 2395 void RenderWidgetHostViewAura::SetPopupChild( | 2396 void RenderWidgetHostViewAura::SetPopupChild( |
| 2396 RenderWidgetHostViewAura* popup_child_host_view) { | 2397 RenderWidgetHostViewAura* popup_child_host_view) { |
| 2397 popup_child_host_view_ = popup_child_host_view; | 2398 popup_child_host_view_ = popup_child_host_view; |
| 2398 event_handler_->SetPopupChild( | 2399 event_handler_->SetPopupChild( |
| 2399 popup_child_host_view, | 2400 popup_child_host_view, |
| 2400 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2401 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
| 2401 } | 2402 } |
| 2402 | 2403 |
| 2403 } // namespace content | 2404 } // namespace content |
| OLD | NEW |