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

Side by Side Diff: branches/1916/src/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h

Issue 253183002: Revert 266967 "Merge 266651 "linux-aura: Supports Compose key wi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | branches/1916/src/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_ 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_
6 #define CHROME_BROWSER_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_ 6 #define CHROME_BROWSER_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_
7 7
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "ui/base/glib/glib_integers.h" 11 #include "ui/base/glib/glib_integers.h"
12 #include "ui/base/glib/glib_signal.h" 12 #include "ui/base/glib/glib_signal.h"
13 #include "ui/base/ime/linux/linux_input_method_context.h" 13 #include "ui/base/ime/linux/linux_input_method_context.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 15
16 typedef struct _GdkDrawable GdkWindow;
17 typedef struct _GtkIMContext GtkIMContext; 16 typedef struct _GtkIMContext GtkIMContext;
18 17
19 namespace libgtk2ui { 18 namespace libgtk2ui {
20 19
21 // An implementation of LinuxInputMethodContext which is based on X11 event loop 20 // An implementation of LinuxInputMethodContext which is based on X11 event loop
22 // and uses GtkIMContext(gtk-immodule) as a bridge from/to underlying IMEs. 21 // and uses GtkIMContext(gtk-immodule) as a bridge from/to underlying IMEs.
23 class X11InputMethodContextImplGtk2 : public ui::LinuxInputMethodContext { 22 class X11InputMethodContextImplGtk2 : public ui::LinuxInputMethodContext {
24 public: 23 public:
25 explicit X11InputMethodContextImplGtk2( 24 explicit X11InputMethodContextImplGtk2(
26 ui::LinuxInputMethodContextDelegate* delegate); 25 ui::LinuxInputMethodContextDelegate* delegate);
(...skipping 27 matching lines...) Expand all
54 // IME's input context used for TEXT_INPUT_TYPE_NONE and 53 // IME's input context used for TEXT_INPUT_TYPE_NONE and
55 // TEXT_INPUT_TYPE_PASSWORD. 54 // TEXT_INPUT_TYPE_PASSWORD.
56 GtkIMContext* gtk_context_simple_; 55 GtkIMContext* gtk_context_simple_;
57 // IME's input context used for the other text input types. 56 // IME's input context used for the other text input types.
58 GtkIMContext* gtk_multicontext_; 57 GtkIMContext* gtk_multicontext_;
59 58
60 // An alias to |gtk_context_simple_| or |gtk_multicontext_| depending on the 59 // An alias to |gtk_context_simple_| or |gtk_multicontext_| depending on the
61 // text input type. Can be NULL when it's not focused. 60 // text input type. Can be NULL when it's not focused.
62 GtkIMContext* gtk_context_; 61 GtkIMContext* gtk_context_;
63 62
64 // Last set client window.
65 GdkWindow* gdk_last_set_client_window_;
66
67 // Last known caret bounds relative to the screen coordinates. 63 // Last known caret bounds relative to the screen coordinates.
68 gfx::Rect last_caret_bounds_; 64 gfx::Rect last_caret_bounds_;
69 65
70 // A set of hardware keycodes of modifier keys. 66 // A set of hardware keycodes of modifier keys.
71 base::hash_set<unsigned int> modifier_keycodes_; 67 base::hash_set<unsigned int> modifier_keycodes_;
72 68
73 // The helper class to trap GTK+'s "commit" signal for direct input key 69 // The helper class to trap GTK+'s "commit" signal for direct input key
74 // events. 70 // events.
75 // 71 //
76 // gtk_im_context_filter_keypress() emits "commit" signal in order to insert 72 // gtk_im_context_filter_keypress() emits "commit" signal in order to insert
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 105
110 FRIEND_TEST_ALL_PREFIXES(X11InputMethodContextImplGtk2FriendTest, 106 FRIEND_TEST_ALL_PREFIXES(X11InputMethodContextImplGtk2FriendTest,
111 GtkCommitSignalTrap); 107 GtkCommitSignalTrap);
112 108
113 DISALLOW_COPY_AND_ASSIGN(X11InputMethodContextImplGtk2); 109 DISALLOW_COPY_AND_ASSIGN(X11InputMethodContextImplGtk2);
114 }; 110 };
115 111
116 } // namespace libgtk2ui 112 } // namespace libgtk2ui
117 113
118 #endif // CHROME_BROWSER_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_ 114 #endif // CHROME_BROWSER_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_
OLDNEW
« no previous file with comments | « no previous file | branches/1916/src/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698