Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: ui/base/ime/input_method_ibus.h

Issue 48393003: Add InputMethodObserver support into InputMethodBase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix -Werror=sign-compare Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/ime/input_method_base_unittest.cc ('k') | ui/base/ime/input_method_ibus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BASE_IME_INPUT_METHOD_IBUS_H_ 5 #ifndef UI_BASE_IME_INPUT_METHOD_IBUS_H_
6 #define UI_BASE_IME_INPUT_METHOD_IBUS_H_ 6 #define UI_BASE_IME_INPUT_METHOD_IBUS_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 29 matching lines...) Expand all
40 virtual void OnFocus() OVERRIDE; 40 virtual void OnFocus() OVERRIDE;
41 virtual void OnBlur() OVERRIDE; 41 virtual void OnBlur() OVERRIDE;
42 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, 42 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
43 NativeEventResult* result) OVERRIDE; 43 NativeEventResult* result) OVERRIDE;
44 virtual bool DispatchKeyEvent( 44 virtual bool DispatchKeyEvent(
45 const base::NativeEvent& native_key_event) OVERRIDE; 45 const base::NativeEvent& native_key_event) OVERRIDE;
46 virtual bool DispatchFabricatedKeyEvent(const ui::KeyEvent& event) OVERRIDE; 46 virtual bool DispatchFabricatedKeyEvent(const ui::KeyEvent& event) OVERRIDE;
47 virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; 47 virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE;
48 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; 48 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE;
49 virtual void CancelComposition(const TextInputClient* client) OVERRIDE; 49 virtual void CancelComposition(const TextInputClient* client) OVERRIDE;
50 virtual void OnInputLocaleChanged() OVERRIDE;
51 virtual std::string GetInputLocale() OVERRIDE; 50 virtual std::string GetInputLocale() OVERRIDE;
52 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; 51 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE;
53 virtual bool IsActive() OVERRIDE; 52 virtual bool IsActive() OVERRIDE;
54 virtual bool IsCandidatePopupOpen() const OVERRIDE; 53 virtual bool IsCandidatePopupOpen() const OVERRIDE;
55 54
56 protected: 55 protected:
57 // Converts |text| into CompositionText. 56 // Converts |text| into CompositionText.
58 void ExtractCompositionText(const chromeos::IBusText& text, 57 void ExtractCompositionText(const chromeos::IBusText& text,
59 uint32 cursor_position, 58 uint32 cursor_position,
60 CompositionText* out_composition) const; 59 CompositionText* out_composition) const;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 virtual void HidePreeditText() OVERRIDE; 131 virtual void HidePreeditText() OVERRIDE;
133 virtual void UpdatePreeditText(const chromeos::IBusText& text, 132 virtual void UpdatePreeditText(const chromeos::IBusText& text,
134 uint32 cursor_pos, 133 uint32 cursor_pos,
135 bool visible) OVERRIDE; 134 bool visible) OVERRIDE;
136 virtual void DeleteSurroundingText(int32 offset, uint32 length) OVERRIDE; 135 virtual void DeleteSurroundingText(int32 offset, uint32 length) OVERRIDE;
137 136
138 void ProcessKeyEventDone(uint32 id, XEvent* xevent, 137 void ProcessKeyEventDone(uint32 id, XEvent* xevent,
139 uint32 ibus_keyval, uint32 ibus_keycode, 138 uint32 ibus_keyval, uint32 ibus_keycode,
140 uint32 ibus_state, bool is_handled); 139 uint32 ibus_state, bool is_handled);
141 140
141 // Processes a caret bounds changed event.
142 void OnCaretBoundsChangedInternal(const TextInputClient* client);
143
142 // All pending key events. Note: we do not own these object, we just save 144 // All pending key events. Note: we do not own these object, we just save
143 // pointers to these object so that we can abandon them when necessary. 145 // pointers to these object so that we can abandon them when necessary.
144 // They will be deleted in ProcessKeyEventDone(). 146 // They will be deleted in ProcessKeyEventDone().
145 std::set<uint32> pending_key_events_; 147 std::set<uint32> pending_key_events_;
146 148
147 // Pending composition text generated by the current pending key event. 149 // Pending composition text generated by the current pending key event.
148 // It'll be sent to the focused text input client as soon as we receive the 150 // It'll be sent to the focused text input client as soon as we receive the
149 // processing result of the pending key event. 151 // processing result of the pending key event.
150 CompositionText composition_; 152 CompositionText composition_;
151 153
(...skipping 29 matching lines...) Expand all
181 183
182 // Used for making callbacks. 184 // Used for making callbacks.
183 base::WeakPtrFactory<InputMethodIBus> weak_ptr_factory_; 185 base::WeakPtrFactory<InputMethodIBus> weak_ptr_factory_;
184 186
185 DISALLOW_COPY_AND_ASSIGN(InputMethodIBus); 187 DISALLOW_COPY_AND_ASSIGN(InputMethodIBus);
186 }; 188 };
187 189
188 } // namespace ui 190 } // namespace ui
189 191
190 #endif // UI_BASE_IME_INPUT_METHOD_IBUS_H_ 192 #endif // UI_BASE_IME_INPUT_METHOD_IBUS_H_
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_base_unittest.cc ('k') | ui/base/ime/input_method_ibus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698