OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gdk/gdk.h> | 9 #include <gdk/gdk.h> |
10 #include <pango/pango-attributes.h> | 10 #include <pango/pango-attributes.h> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/string16.h" | 15 #include "base/string16.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h" | |
18 #include "ui/base/ime/composition_text.h" | 17 #include "ui/base/ime/composition_text.h" |
| 18 #include "ui/base/ime/text_input_type.h" |
19 | 19 |
20 namespace gfx { | 20 namespace gfx { |
21 class Rect; | 21 class Rect; |
22 } | 22 } |
23 | 23 |
24 #if !defined(TOOLKIT_VIEWS) | 24 #if !defined(TOOLKIT_VIEWS) |
25 class MenuGtk; | 25 class MenuGtk; |
26 #endif | 26 #endif |
27 class RenderWidgetHostViewGtk; | 27 class RenderWidgetHostViewGtk; |
28 struct NativeWebKeyboardEvent; | 28 struct NativeWebKeyboardEvent; |
(...skipping 12 matching lines...) Expand all Loading... |
41 // | 41 // |
42 // This class is used solely by RenderWidgetHostViewGtk. | 42 // This class is used solely by RenderWidgetHostViewGtk. |
43 class GtkIMContextWrapper { | 43 class GtkIMContextWrapper { |
44 public: | 44 public: |
45 explicit GtkIMContextWrapper(RenderWidgetHostViewGtk* host_view); | 45 explicit GtkIMContextWrapper(RenderWidgetHostViewGtk* host_view); |
46 ~GtkIMContextWrapper(); | 46 ~GtkIMContextWrapper(); |
47 | 47 |
48 // Processes a gdk key event received by |host_view|. | 48 // Processes a gdk key event received by |host_view|. |
49 void ProcessKeyEvent(GdkEventKey* event); | 49 void ProcessKeyEvent(GdkEventKey* event); |
50 | 50 |
51 void UpdateInputMethodState(WebKit::WebTextInputType type, | 51 void UpdateInputMethodState(ui::TextInputType type, |
| 52 bool can_compose_inline, |
52 const gfx::Rect& caret_rect); | 53 const gfx::Rect& caret_rect); |
53 void OnFocusIn(); | 54 void OnFocusIn(); |
54 void OnFocusOut(); | 55 void OnFocusOut(); |
55 | 56 |
56 #if !defined(TOOLKIT_VIEWS) | 57 #if !defined(TOOLKIT_VIEWS) |
57 // Not defined for views because the views context menu doesn't | 58 // Not defined for views because the views context menu doesn't |
58 // implement input methods yet. | 59 // implement input methods yet. |
59 void AppendInputMethodsContextMenu(MenuGtk* menu); | 60 void AppendInputMethodsContextMenu(MenuGtk* menu); |
60 #endif | 61 #endif |
61 | 62 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 // Information of the last key event, for working around | 190 // Information of the last key event, for working around |
190 // http://crosbug.com/6582 | 191 // http://crosbug.com/6582 |
191 int last_key_code_; | 192 int last_key_code_; |
192 bool last_key_was_up_; | 193 bool last_key_was_up_; |
193 bool last_key_filtered_no_result_; | 194 bool last_key_filtered_no_result_; |
194 | 195 |
195 DISALLOW_COPY_AND_ASSIGN(GtkIMContextWrapper); | 196 DISALLOW_COPY_AND_ASSIGN(GtkIMContextWrapper); |
196 }; | 197 }; |
197 | 198 |
198 #endif // CHROME_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ | 199 #endif // CHROME_BROWSER_RENDERER_HOST_GTK_IM_CONTEXT_WRAPPER_H_ |
OLD | NEW |