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

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

Issue 2536943004: Fix a crash occuring during the destruction of TextInputManager on Android. (Closed)
Patch Set: Fixed a Compile Error in Test Created 4 years 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_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 return reinterpret_cast<intptr_t>(&ime_adapter_android_); 760 return reinterpret_cast<intptr_t>(&ime_adapter_android_);
761 } 761 }
762 762
763 // ----------------------------------------------------------------------------- 763 // -----------------------------------------------------------------------------
764 // TextInputManager::Observer implementations. 764 // TextInputManager::Observer implementations.
765 void RenderWidgetHostViewAndroid::OnUpdateTextInputStateCalled( 765 void RenderWidgetHostViewAndroid::OnUpdateTextInputStateCalled(
766 TextInputManager* text_input_manager, 766 TextInputManager* text_input_manager,
767 RenderWidgetHostViewBase* updated_view, 767 RenderWidgetHostViewBase* updated_view,
768 bool did_change_state) { 768 bool did_change_state) {
769 DCHECK_EQ(text_input_manager_, text_input_manager); 769 DCHECK_EQ(text_input_manager_, text_input_manager);
770 // If there are no active widgets, the TextInputState.type should be reported
771 // as none.
770 const TextInputState& state = 772 const TextInputState& state =
771 *GetTextInputManager()->GetTextInputState(updated_view); 773 GetTextInputManager()->GetActiveWidget()
774 ? *GetTextInputManager()->GetTextInputState()
Charlie Reis 2016/11/30 00:05:23 I assume it's intentional to remove |updated_view|
EhsanK 2016/11/30 00:34:25 I believe there is no use for it. I am removing it
775 : TextInputState();
772 if (state.is_non_ime_change && updated_view->GetRenderWidgetHost()) { 776 if (state.is_non_ime_change && updated_view->GetRenderWidgetHost()) {
773 // Sends an acknowledgement to the renderer of a processed IME event. 777 // Sends an acknowledgement to the renderer of a processed IME event.
774 updated_view->GetRenderWidgetHost()->Send( 778 updated_view->GetRenderWidgetHost()->Send(
775 new InputMsg_ImeEventAck(host_->GetRoutingID())); 779 new InputMsg_ImeEventAck(host_->GetRoutingID()));
776 } 780 }
777 781
778 if (!content_view_core_) 782 if (!content_view_core_)
779 return; 783 return;
780 784
781 content_view_core_->UpdateImeAdapter( 785 content_view_core_->UpdateImeAdapter(
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 case ui::MotionEvent::ACTION_UP: 1994 case ui::MotionEvent::ACTION_UP:
1991 case ui::MotionEvent::ACTION_POINTER_UP: 1995 case ui::MotionEvent::ACTION_POINTER_UP:
1992 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1996 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1993 delta.InMicroseconds(), 1, 1000000, 50); 1997 delta.InMicroseconds(), 1, 1000000, 50);
1994 default: 1998 default:
1995 return; 1999 return;
1996 } 2000 }
1997 } 2001 }
1998 2002
1999 } // namespace content 2003 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698