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

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

Issue 2171443003: In TextInputManager, reset input type to none before switching active widgets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing kenrb@'s comments Created 4 years, 4 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
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 2960 matching lines...) Expand 10 before | Expand all | Expand 10 after
2971 cc::SurfaceId RenderWidgetHostViewAura::SurfaceIdForTesting() const { 2971 cc::SurfaceId RenderWidgetHostViewAura::SurfaceIdForTesting() const {
2972 return delegated_frame_host_->SurfaceIdForTesting(); 2972 return delegated_frame_host_->SurfaceIdForTesting();
2973 } 2973 }
2974 2974
2975 void RenderWidgetHostViewAura::OnUpdateTextInputStateCalled( 2975 void RenderWidgetHostViewAura::OnUpdateTextInputStateCalled(
2976 TextInputManager* text_input_manager, 2976 TextInputManager* text_input_manager,
2977 RenderWidgetHostViewBase* updated_view, 2977 RenderWidgetHostViewBase* updated_view,
2978 bool did_update_state) { 2978 bool did_update_state) {
2979 DCHECK_EQ(text_input_manager_, text_input_manager); 2979 DCHECK_EQ(text_input_manager_, text_input_manager);
2980 2980
2981 // We only process updates from the active widget as the ones from other views
2982 // are due to late arriving IPCs which are no longer needed.
2983 if (GetTextInputManager()->GetActiveWidget() !=
2984 updated_view->GetRenderWidgetHost())
EhsanK 2016/07/27 16:17:44 The intention for adding this logic was to make su
2985 return;
2986
2981 if (!GetInputMethod()) 2987 if (!GetInputMethod())
2982 return; 2988 return;
2983 2989
2984 if (did_update_state) 2990 if (did_update_state)
2985 GetInputMethod()->OnTextInputTypeChanged(this); 2991 GetInputMethod()->OnTextInputTypeChanged(this);
2986 2992
2987 const TextInputState* state = text_input_manager_->GetTextInputState(); 2993 const TextInputState* state = text_input_manager_->GetTextInputState();
2988 2994
2989 if (state && state->show_ime_if_needed && 2995 if (state && state->show_ime_if_needed &&
2990 state->type != ui::TEXT_INPUT_TYPE_NONE) 2996 state->type != ui::TEXT_INPUT_TYPE_NONE)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
3040 3046
3041 //////////////////////////////////////////////////////////////////////////////// 3047 ////////////////////////////////////////////////////////////////////////////////
3042 // RenderWidgetHostViewBase, public: 3048 // RenderWidgetHostViewBase, public:
3043 3049
3044 // static 3050 // static
3045 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 3051 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
3046 GetScreenInfoForWindow(results, NULL); 3052 GetScreenInfoForWindow(results, NULL);
3047 } 3053 }
3048 3054
3049 } // namespace content 3055 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698