| 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 CONTENT_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ |
| 7 | 7 |
| 8 #include <gdk/gdk.h> | 8 #include <gdk/gdk.h> |
| 9 #include <pango/pango-attributes.h> | 9 #include <pango/pango-attributes.h> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 bool HasInputMethodResult() const; | 68 bool HasInputMethodResult() const; |
| 69 | 69 |
| 70 void ProcessFilteredKeyPressEvent(NativeWebKeyboardEvent* wke); | 70 void ProcessFilteredKeyPressEvent(NativeWebKeyboardEvent* wke); |
| 71 void ProcessUnfilteredKeyPressEvent(NativeWebKeyboardEvent* wke); | 71 void ProcessUnfilteredKeyPressEvent(NativeWebKeyboardEvent* wke); |
| 72 | 72 |
| 73 // Processes result returned from input method after filtering a key event. | 73 // Processes result returned from input method after filtering a key event. |
| 74 // |filtered| indicates if the key event was filtered by the input method. | 74 // |filtered| indicates if the key event was filtered by the input method. |
| 75 void ProcessInputMethodResult(const GdkEventKey* event, bool filtered); | 75 void ProcessInputMethodResult(const GdkEventKey* event, bool filtered); |
| 76 | 76 |
| 77 // Real code of "commit" signal handler. | 77 // Real code of "commit" signal handler. |
| 78 void HandleCommit(const string16& text); | 78 void HandleCommit(const base::string16& text); |
| 79 | 79 |
| 80 // Real code of "preedit-start" signal handler. | 80 // Real code of "preedit-start" signal handler. |
| 81 void HandlePreeditStart(); | 81 void HandlePreeditStart(); |
| 82 | 82 |
| 83 // Real code of "preedit-changed" signal handler. | 83 // Real code of "preedit-changed" signal handler. |
| 84 void HandlePreeditChanged(const gchar* text, | 84 void HandlePreeditChanged(const gchar* text, |
| 85 PangoAttrList* attrs, | 85 PangoAttrList* attrs, |
| 86 int cursor_position); | 86 int cursor_position); |
| 87 | 87 |
| 88 // Real code of "preedit-end" signal handler. | 88 // Real code of "preedit-end" signal handler. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 bool is_in_key_event_handler_; | 173 bool is_in_key_event_handler_; |
| 174 | 174 |
| 175 // The most recent composition text information retrieved from context_; | 175 // The most recent composition text information retrieved from context_; |
| 176 ui::CompositionText composition_; | 176 ui::CompositionText composition_; |
| 177 | 177 |
| 178 // Whether or not the composition has been changed since last key event. | 178 // Whether or not the composition has been changed since last key event. |
| 179 bool is_composition_changed_; | 179 bool is_composition_changed_; |
| 180 | 180 |
| 181 // Stores a copy of the most recent commit text received by commit signal | 181 // Stores a copy of the most recent commit text received by commit signal |
| 182 // handler. | 182 // handler. |
| 183 string16 commit_text_; | 183 base::string16 commit_text_; |
| 184 | 184 |
| 185 // If it's true then the next "commit" signal will be suppressed. | 185 // If it's true then the next "commit" signal will be suppressed. |
| 186 // It's only used to workaround http://crbug.com/50485. | 186 // It's only used to workaround http://crbug.com/50485. |
| 187 // TODO(suzhe): Remove it after input methods get fixed. | 187 // TODO(suzhe): Remove it after input methods get fixed. |
| 188 bool suppress_next_commit_; | 188 bool suppress_next_commit_; |
| 189 | 189 |
| 190 // Information of the last key event, for working around | 190 // Information of the last key event, for working around |
| 191 // http://crosbug.com/6582 | 191 // http://crosbug.com/6582 |
| 192 int last_key_code_; | 192 int last_key_code_; |
| 193 bool last_key_was_up_; | 193 bool last_key_was_up_; |
| 194 bool last_key_filtered_no_result_; | 194 bool last_key_filtered_no_result_; |
| 195 | 195 |
| 196 DISALLOW_COPY_AND_ASSIGN(GtkIMContextWrapper); | 196 DISALLOW_COPY_AND_ASSIGN(GtkIMContextWrapper); |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 } // namespace content | 199 } // namespace content |
| 200 | 200 |
| 201 #endif // CONTENT_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ | 201 #endif // CONTENT_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ |
| OLD | NEW |