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

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

Issue 2626903004: Don't show the virtual keyboard if there's no text input client (Closed)
Patch Set: Solution 2 Created 3 years, 11 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 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()->GetTextInputClient() == this) {
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
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
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