Chromium Code Reviews| 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 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2295 bool did_update_state) { | 2295 bool did_update_state) { |
| 2296 DCHECK_EQ(text_input_manager_, text_input_manager); | 2296 DCHECK_EQ(text_input_manager_, text_input_manager); |
| 2297 | 2297 |
| 2298 if (!GetInputMethod()) | 2298 if (!GetInputMethod()) |
| 2299 return; | 2299 return; |
| 2300 | 2300 |
| 2301 if (did_update_state) | 2301 if (did_update_state) |
| 2302 GetInputMethod()->OnTextInputTypeChanged(this); | 2302 GetInputMethod()->OnTextInputTypeChanged(this); |
| 2303 | 2303 |
| 2304 const TextInputState* state = text_input_manager_->GetTextInputState(); | 2304 const TextInputState* state = text_input_manager_->GetTextInputState(); |
| 2305 if (state && state->show_ime_if_needed) | 2305 if (state && state->show_ime_if_needed && |
| 2306 GetInputMethod()->GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE) { | |
|
sadrul
2017/01/11 02:46:06
Two alternate options that I think would be better
afakhry
2017/01/11 17:50:49
Thank you very much for the detailed suggestions!
sadrul
2017/01/11 17:53:27
This is unexpected to me. RenderWidgetHostViewAura
afakhry
2017/01/11 18:36:00
Oops, sorry, I was looking at the *raw* pointer va
| |
| 2306 GetInputMethod()->ShowImeIfNeeded(); | 2307 GetInputMethod()->ShowImeIfNeeded(); |
| 2307 | 2308 } |
| 2308 | 2309 |
| 2309 if (state && state->type != ui::TEXT_INPUT_TYPE_NONE) { | 2310 if (state && state->type != ui::TEXT_INPUT_TYPE_NONE) { |
| 2310 // Start monitoring the composition information if the focused node is | 2311 // Start monitoring the composition information if the focused node is |
| 2311 // editable. | 2312 // editable. |
| 2312 RenderWidgetHostImpl* last_active_widget = | 2313 RenderWidgetHostImpl* last_active_widget = |
| 2313 text_input_manager_->GetActiveWidget(); | 2314 text_input_manager_->GetActiveWidget(); |
| 2314 last_active_widget_routing_id_ = last_active_widget->GetRoutingID(); | 2315 last_active_widget_routing_id_ = last_active_widget->GetRoutingID(); |
| 2315 last_active_widget_process_id_ = last_active_widget->GetProcess()->GetID(); | 2316 last_active_widget_process_id_ = last_active_widget->GetProcess()->GetID(); |
| 2316 last_active_widget->Send(new InputMsg_RequestCompositionUpdate( | 2317 last_active_widget->Send(new InputMsg_RequestCompositionUpdate( |
| 2317 last_active_widget->GetRoutingID(), false /* immediate request */, | 2318 last_active_widget->GetRoutingID(), false /* immediate request */, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2383 | 2384 |
| 2384 void RenderWidgetHostViewAura::SetPopupChild( | 2385 void RenderWidgetHostViewAura::SetPopupChild( |
| 2385 RenderWidgetHostViewAura* popup_child_host_view) { | 2386 RenderWidgetHostViewAura* popup_child_host_view) { |
| 2386 popup_child_host_view_ = popup_child_host_view; | 2387 popup_child_host_view_ = popup_child_host_view; |
| 2387 event_handler_->SetPopupChild( | 2388 event_handler_->SetPopupChild( |
| 2388 popup_child_host_view, | 2389 popup_child_host_view, |
| 2389 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2390 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
| 2390 } | 2391 } |
| 2391 | 2392 |
| 2392 } // namespace content | 2393 } // namespace content |
| OLD | NEW |