| 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 #ifndef UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ | 5 #ifndef UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ |
| 6 #define UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ | 6 #define UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 virtual bool GetTextRange(ui::Range* range) OVERRIDE; | 59 virtual bool GetTextRange(ui::Range* range) OVERRIDE; |
| 60 virtual bool GetCompositionTextRange(ui::Range* range) OVERRIDE; | 60 virtual bool GetCompositionTextRange(ui::Range* range) OVERRIDE; |
| 61 virtual bool GetSelectionRange(ui::Range* range) OVERRIDE; | 61 virtual bool GetSelectionRange(ui::Range* range) OVERRIDE; |
| 62 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE; | 62 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE; |
| 63 virtual bool DeleteRange(const ui::Range& range) OVERRIDE; | 63 virtual bool DeleteRange(const ui::Range& range) OVERRIDE; |
| 64 virtual bool GetTextFromRange( | 64 virtual bool GetTextFromRange( |
| 65 const ui::Range& range, string16* text) OVERRIDE; | 65 const ui::Range& range, string16* text) OVERRIDE; |
| 66 virtual void OnInputMethodChanged() OVERRIDE; | 66 virtual void OnInputMethodChanged() OVERRIDE; |
| 67 virtual bool ChangeTextDirectionAndLayoutAlignment( | 67 virtual bool ChangeTextDirectionAndLayoutAlignment( |
| 68 base::i18n::TextDirection direction) OVERRIDE; | 68 base::i18n::TextDirection direction) OVERRIDE; |
| 69 virtual void ExtendSelectionAndDelete(int before, int after) OVERRIDE; |
| 69 | 70 |
| 70 // Overridden from FocusChangeListener. | 71 // Overridden from FocusChangeListener. |
| 71 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; | 72 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; |
| 72 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; | 73 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 void UpdateViewFocusState(); | 76 void UpdateViewFocusState(); |
| 76 | 77 |
| 77 // Returns a rectangle converted from |rect| from a focused View's coordinate | 78 // Returns a rectangle converted from |rect| from a focused View's coordinate |
| 78 // system to that of the screen. | 79 // system to that of the screen. |
| 79 gfx::Rect ConvertRectToFocusedView(const gfx::Rect& rect); | 80 gfx::Rect ConvertRectToFocusedView(const gfx::Rect& rect); |
| 80 | 81 |
| 81 ui::InputMethod* const host_; | 82 ui::InputMethod* const host_; |
| 82 bool context_focused_; | 83 bool context_focused_; |
| 83 | 84 |
| 84 DISALLOW_COPY_AND_ASSIGN(InputMethodBridge); | 85 DISALLOW_COPY_AND_ASSIGN(InputMethodBridge); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace views | 88 } // namespace views |
| 88 | 89 |
| 89 #endif // UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ | 90 #endif // UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ |
| OLD | NEW |