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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 RenderWidgetHostViewBase* updated_view, | 713 RenderWidgetHostViewBase* updated_view, |
714 bool did_change_state) { | 714 bool did_change_state) { |
715 DCHECK_EQ(text_input_manager_, text_input_manager); | 715 DCHECK_EQ(text_input_manager_, text_input_manager); |
716 // If there are no active widgets, the TextInputState.type should be reported | 716 // If there are no active widgets, the TextInputState.type should be reported |
717 // as none. | 717 // as none. |
718 const TextInputState& state = | 718 const TextInputState& state = |
719 GetTextInputManager()->GetActiveWidget() | 719 GetTextInputManager()->GetActiveWidget() |
720 ? *GetTextInputManager()->GetTextInputState() | 720 ? *GetTextInputManager()->GetTextInputState() |
721 : TextInputState(); | 721 : TextInputState(); |
722 | 722 |
723 if (!ime_adapter_android_ || is_in_vr_) | 723 if (!content_view_core_ || is_in_vr_) |
724 return; | 724 return; |
725 | 725 |
726 ime_adapter_android_->UpdateState(state); | 726 content_view_core_->UpdateImeAdapter( |
| 727 static_cast<int>(state.type), state.flags, state.mode, state.value, |
| 728 state.selection_start, state.selection_end, state.composition_start, |
| 729 state.composition_end, state.show_ime_if_needed, state.reply_to_request); |
727 } | 730 } |
728 | 731 |
729 void RenderWidgetHostViewAndroid::OnImeCompositionRangeChanged( | 732 void RenderWidgetHostViewAndroid::OnImeCompositionRangeChanged( |
730 TextInputManager* text_input_manager, | 733 TextInputManager* text_input_manager, |
731 RenderWidgetHostViewBase* updated_view) { | 734 RenderWidgetHostViewBase* updated_view) { |
732 DCHECK_EQ(text_input_manager_, text_input_manager); | 735 DCHECK_EQ(text_input_manager_, text_input_manager); |
733 const TextInputManager::CompositionRangeInfo* info = | 736 const TextInputManager::CompositionRangeInfo* info = |
734 text_input_manager_->GetCompositionRangeInfo(); | 737 text_input_manager_->GetCompositionRangeInfo(); |
735 if (!info) | 738 if (!info) |
736 return; | 739 return; |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2172 | 2175 |
2173 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2176 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
2174 if (!compositor) | 2177 if (!compositor) |
2175 return; | 2178 return; |
2176 | 2179 |
2177 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2180 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
2178 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2181 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
2179 } | 2182 } |
2180 | 2183 |
2181 } // namespace content | 2184 } // namespace content |
OLD | NEW |