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_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <peninputpanel_i.c> | 9 #include <peninputpanel_i.c> |
10 #include <stack> | 10 #include <stack> |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 text_input_type_ = type; | 945 text_input_type_ = type; |
946 if (is_enabled) | 946 if (is_enabled) |
947 ime_input_.EnableIME(m_hWnd); | 947 ime_input_.EnableIME(m_hWnd); |
948 else | 948 else |
949 ime_input_.DisableIME(m_hWnd); | 949 ime_input_.DisableIME(m_hWnd); |
950 } | 950 } |
951 } | 951 } |
952 | 952 |
953 void RenderWidgetHostViewWin::SelectionBoundsChanged( | 953 void RenderWidgetHostViewWin::SelectionBoundsChanged( |
954 const gfx::Rect& start_rect, | 954 const gfx::Rect& start_rect, |
955 const gfx::Rect& end_rect) { | 955 WebKit::WebTextDirection start_direction, |
| 956 const gfx::Rect& end_rect, |
| 957 WebKit::WebTextDirection end_direction) { |
956 bool is_enabled = (text_input_type_ != ui::TEXT_INPUT_TYPE_NONE && | 958 bool is_enabled = (text_input_type_ != ui::TEXT_INPUT_TYPE_NONE && |
957 text_input_type_ != ui::TEXT_INPUT_TYPE_PASSWORD); | 959 text_input_type_ != ui::TEXT_INPUT_TYPE_PASSWORD); |
958 // Only update caret position if the input method is enabled. | 960 // Only update caret position if the input method is enabled. |
959 if (is_enabled) | 961 if (is_enabled) |
960 ime_input_.UpdateCaretRect(m_hWnd, start_rect.Union(end_rect)); | 962 ime_input_.UpdateCaretRect(m_hWnd, start_rect.Union(end_rect)); |
961 } | 963 } |
962 | 964 |
963 void RenderWidgetHostViewWin::ImeCancelComposition() { | 965 void RenderWidgetHostViewWin::ImeCancelComposition() { |
964 ime_input_.CancelIME(m_hWnd); | 966 ime_input_.CancelIME(m_hWnd); |
965 } | 967 } |
(...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3046 // receive a focus change in the context of a pointer down message, it means | 3048 // receive a focus change in the context of a pointer down message, it means |
3047 // that the pointer down message occurred on the edit field and we should | 3049 // that the pointer down message occurred on the edit field and we should |
3048 // display the on screen keyboard | 3050 // display the on screen keyboard |
3049 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 3051 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
3050 DisplayOnScreenKeyboardIfNeeded(); | 3052 DisplayOnScreenKeyboardIfNeeded(); |
3051 received_focus_change_after_pointer_down_ = false; | 3053 received_focus_change_after_pointer_down_ = false; |
3052 pointer_down_context_ = false; | 3054 pointer_down_context_ = false; |
3053 } | 3055 } |
3054 | 3056 |
3055 } // namespace content | 3057 } // namespace content |
OLD | NEW |