| 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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 // Do nothing. The UI notification is handled through ContentViewClient which | 756 // Do nothing. The UI notification is handled through ContentViewClient which |
| 757 // is TabContentsDelegate. | 757 // is TabContentsDelegate. |
| 758 } | 758 } |
| 759 | 759 |
| 760 long RenderWidgetHostViewAndroid::GetNativeImeAdapter() { | 760 long RenderWidgetHostViewAndroid::GetNativeImeAdapter() { |
| 761 return reinterpret_cast<intptr_t>(&ime_adapter_android_); | 761 return reinterpret_cast<intptr_t>(&ime_adapter_android_); |
| 762 } | 762 } |
| 763 | 763 |
| 764 void RenderWidgetHostViewAndroid::TextInputStateChanged( | 764 void RenderWidgetHostViewAndroid::TextInputStateChanged( |
| 765 const TextInputState& params) { | 765 const TextInputState& params) { |
| 766 if (params.is_non_ime_change) { | 766 if (params.requires_ack) { |
| 767 // Sends an acknowledgement to the renderer of a processed IME event. | 767 // Sends an acknowledgement to the renderer of a processed IME event. |
| 768 host_->Send(new InputMsg_ImeEventAck(host_->GetRoutingID())); | 768 host_->Send(new InputMsg_ImeEventAck(host_->GetRoutingID())); |
| 769 } | 769 } |
| 770 | 770 |
| 771 if (!content_view_core_) | 771 if (!content_view_core_) |
| 772 return; | 772 return; |
| 773 | 773 |
| 774 content_view_core_->UpdateImeAdapter( | 774 content_view_core_->UpdateImeAdapter( |
| 775 GetNativeImeAdapter(), | 775 GetNativeImeAdapter(), |
| 776 static_cast<int>(params.type), params.flags, | 776 static_cast<int>(params.type), params.flags, |
| (...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1988 case ui::MotionEvent::ACTION_UP: | 1988 case ui::MotionEvent::ACTION_UP: |
| 1989 case ui::MotionEvent::ACTION_POINTER_UP: | 1989 case ui::MotionEvent::ACTION_POINTER_UP: |
| 1990 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1990 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
| 1991 delta.InMicroseconds(), 1, 1000000, 50); | 1991 delta.InMicroseconds(), 1, 1000000, 50); |
| 1992 default: | 1992 default: |
| 1993 return; | 1993 return; |
| 1994 } | 1994 } |
| 1995 } | 1995 } |
| 1996 | 1996 |
| 1997 } // namespace content | 1997 } // namespace content |
| OLD | NEW |