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 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 return reinterpret_cast<intptr_t>(&ime_adapter_android_); | 665 return reinterpret_cast<intptr_t>(&ime_adapter_android_); |
666 } | 666 } |
667 | 667 |
668 void RenderWidgetHostViewAndroid::TextInputStateChanged( | 668 void RenderWidgetHostViewAndroid::TextInputStateChanged( |
669 const ViewHostMsg_TextInputState_Params& params) { | 669 const ViewHostMsg_TextInputState_Params& params) { |
670 if (params.is_non_ime_change) { | 670 if (params.is_non_ime_change) { |
671 // Sends an acknowledgement to the renderer of a processed IME event. | 671 // Sends an acknowledgement to the renderer of a processed IME event. |
672 host_->Send(new InputMsg_ImeEventAck(host_->GetRoutingID())); | 672 host_->Send(new InputMsg_ImeEventAck(host_->GetRoutingID())); |
673 } | 673 } |
674 | 674 |
675 if (!IsShowing()) | 675 if (!content_view_core_) |
676 return; | 676 return; |
677 | 677 |
678 content_view_core_->UpdateImeAdapter( | 678 content_view_core_->UpdateImeAdapter( |
679 GetNativeImeAdapter(), | 679 GetNativeImeAdapter(), |
680 static_cast<int>(params.type), params.flags, | 680 static_cast<int>(params.type), params.flags, |
681 params.value, params.selection_start, params.selection_end, | 681 params.value, params.selection_start, params.selection_end, |
682 params.composition_start, params.composition_end, | 682 params.composition_start, params.composition_end, |
683 params.show_ime_if_needed, params.is_non_ime_change); | 683 params.show_ime_if_needed, params.is_non_ime_change); |
684 } | 684 } |
685 | 685 |
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2066 results->orientationAngle = display.RotationAsDegree(); | 2066 results->orientationAngle = display.RotationAsDegree(); |
2067 results->orientationType = | 2067 results->orientationType = |
2068 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2068 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2069 gfx::DeviceDisplayInfo info; | 2069 gfx::DeviceDisplayInfo info; |
2070 results->depth = info.GetBitsPerPixel(); | 2070 results->depth = info.GetBitsPerPixel(); |
2071 results->depthPerComponent = info.GetBitsPerComponent(); | 2071 results->depthPerComponent = info.GetBitsPerComponent(); |
2072 results->isMonochrome = (results->depthPerComponent == 0); | 2072 results->isMonochrome = (results->depthPerComponent == 0); |
2073 } | 2073 } |
2074 | 2074 |
2075 } // namespace content | 2075 } // namespace content |
OLD | NEW |