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

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

Issue 2470713002: [WIP Approach 1] Straighten up input method reactivation
Patch Set: fix some tests Created 4 years, 1 month 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 | content/common/text_input_state.h » ('j') | 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_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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/common/text_input_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698