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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 virtual void InsertText(const string16& text) OVERRIDE; | 57 virtual void InsertText(const string16& text) OVERRIDE; |
58 virtual void InsertChar(char16 ch, int flags) OVERRIDE; | 58 virtual void InsertChar(char16 ch, int flags) OVERRIDE; |
59 virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE; | 59 virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE; |
60 virtual ui::TextInputType GetTextInputType() const OVERRIDE; | 60 virtual ui::TextInputType GetTextInputType() const OVERRIDE; |
61 virtual ui::TextInputMode GetTextInputMode() const OVERRIDE; | 61 virtual ui::TextInputMode GetTextInputMode() const OVERRIDE; |
62 virtual bool CanComposeInline() const OVERRIDE; | 62 virtual bool CanComposeInline() const OVERRIDE; |
63 virtual gfx::Rect GetCaretBounds() OVERRIDE; | 63 virtual gfx::Rect GetCaretBounds() OVERRIDE; |
64 virtual bool GetCompositionCharacterBounds(uint32 index, | 64 virtual bool GetCompositionCharacterBounds(uint32 index, |
65 gfx::Rect* rect) OVERRIDE; | 65 gfx::Rect* rect) OVERRIDE; |
66 virtual bool HasCompositionText() OVERRIDE; | 66 virtual bool HasCompositionText() OVERRIDE; |
67 virtual bool GetTextRange(ui::Range* range) OVERRIDE; | 67 virtual bool GetTextRange(gfx::Range* range) OVERRIDE; |
68 virtual bool GetCompositionTextRange(ui::Range* range) OVERRIDE; | 68 virtual bool GetCompositionTextRange(gfx::Range* range) OVERRIDE; |
69 virtual bool GetSelectionRange(ui::Range* range) OVERRIDE; | 69 virtual bool GetSelectionRange(gfx::Range* range) OVERRIDE; |
70 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE; | 70 virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE; |
71 virtual bool DeleteRange(const ui::Range& range) OVERRIDE; | 71 virtual bool DeleteRange(const gfx::Range& range) OVERRIDE; |
72 virtual bool GetTextFromRange( | 72 virtual bool GetTextFromRange( |
73 const ui::Range& range, string16* text) OVERRIDE; | 73 const gfx::Range& range, string16* text) OVERRIDE; |
74 virtual void OnInputMethodChanged() OVERRIDE; | 74 virtual void OnInputMethodChanged() OVERRIDE; |
75 virtual bool ChangeTextDirectionAndLayoutAlignment( | 75 virtual bool ChangeTextDirectionAndLayoutAlignment( |
76 base::i18n::TextDirection direction) OVERRIDE; | 76 base::i18n::TextDirection direction) OVERRIDE; |
77 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE; | 77 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE; |
78 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE; | 78 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE; |
79 | 79 |
80 // Overridden from FocusChangeListener. | 80 // Overridden from FocusChangeListener. |
81 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; | 81 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; |
82 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; | 82 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; |
83 | 83 |
84 ui::InputMethod* GetHostInputMethod() const; | 84 ui::InputMethod* GetHostInputMethod() const; |
85 | 85 |
86 private: | 86 private: |
87 void UpdateViewFocusState(); | 87 void UpdateViewFocusState(); |
88 | 88 |
89 ui::InputMethod* const host_; | 89 ui::InputMethod* const host_; |
90 | 90 |
91 const bool shared_input_method_; | 91 const bool shared_input_method_; |
92 | 92 |
93 bool context_focused_; | 93 bool context_focused_; |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(InputMethodBridge); | 95 DISALLOW_COPY_AND_ASSIGN(InputMethodBridge); |
96 }; | 96 }; |
97 | 97 |
98 } // namespace views | 98 } // namespace views |
99 | 99 |
100 #endif // UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ | 100 #endif // UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ |
OLD | NEW |