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_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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 770 // If there are no active widgets, the TextInputState.type should be reported |
771 // as none. | 771 // as none. |
772 const TextInputState& state = | 772 const TextInputState& state = |
773 GetTextInputManager()->GetActiveWidget() | 773 GetTextInputManager()->GetActiveWidget() |
774 ? *GetTextInputManager()->GetTextInputState() | 774 ? *GetTextInputManager()->GetTextInputState() |
775 : TextInputState(); | 775 : TextInputState(); |
776 if (state.is_non_ime_change && updated_view->GetRenderWidgetHost()) { | |
777 // Sends an acknowledgement to the renderer of a processed IME event. | |
778 updated_view->GetRenderWidgetHost()->Send( | |
779 new InputMsg_ImeEventAck(host_->GetRoutingID())); | |
780 } | |
781 | 776 |
782 if (!content_view_core_) | 777 if (!content_view_core_) |
783 return; | 778 return; |
784 | 779 |
785 content_view_core_->UpdateImeAdapter( | 780 content_view_core_->UpdateImeAdapter( |
786 GetNativeImeAdapter(), static_cast<int>(state.type), state.flags, | 781 GetNativeImeAdapter(), static_cast<int>(state.type), state.flags, |
787 state.mode, state.value, state.selection_start, state.selection_end, | 782 state.mode, state.value, state.selection_start, state.selection_end, |
788 state.composition_start, state.composition_end, state.show_ime_if_needed, | 783 state.composition_start, state.composition_end, state.show_ime_if_needed, |
789 state.is_non_ime_change); | 784 state.is_non_ime_change); |
790 } | 785 } |
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1994 case ui::MotionEvent::ACTION_UP: | 1989 case ui::MotionEvent::ACTION_UP: |
1995 case ui::MotionEvent::ACTION_POINTER_UP: | 1990 case ui::MotionEvent::ACTION_POINTER_UP: |
1996 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1991 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
1997 delta.InMicroseconds(), 1, 1000000, 50); | 1992 delta.InMicroseconds(), 1, 1000000, 50); |
1998 default: | 1993 default: |
1999 return; | 1994 return; |
2000 } | 1995 } |
2001 } | 1996 } |
2002 | 1997 |
2003 } // namespace content | 1998 } // namespace content |
OLD | NEW |