OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "ui/views/ime/input_method_ibus.h" | 5 #include "ui/views/ime/input_method_ibus.h" |
6 | 6 |
7 #include <ibus.h> | 7 #include <ibus.h> |
8 #if defined(TOUCH_UI) | 8 #if defined(TOUCH_UI) |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 #include <X11/Xutil.h> | 10 #include <X11/Xutil.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <cstring> | 14 #include <cstring> |
15 #include <set> | 15 #include <set> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "base/basictypes.h" | 18 #include "base/basictypes.h" |
19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
20 #include "base/i18n/char_iterator.h" | 20 #include "base/i18n/char_iterator.h" |
21 #include "base/logging.h" | 21 #include "base/logging.h" |
22 #include "base/string_util.h" | 22 #include "base/string_util.h" |
23 #include "base/third_party/icu/icu_utf.h" | 23 #include "base/third_party/icu/icu_utf.h" |
24 #include "base/utf_string_conversions.h" | 24 #include "base/utf_string_conversions.h" |
25 #include "ui/base/keycodes/keyboard_codes.h" | 25 #include "ui/base/keycodes/keyboard_codes.h" |
26 #include "ui/gfx/point.h" | 26 #include "ui/gfx/point.h" |
27 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
28 #include "ui/views/events/event.h" | 28 #include "ui/views/events/event.h" |
29 #include "views/widget/widget.h" | 29 #include "ui/views/widget/widget.h" |
30 | 30 |
31 #if defined(USE_AURA) || defined(TOUCH_UI) | 31 #if defined(USE_AURA) || defined(TOUCH_UI) |
32 #include "ui/base/keycodes/keyboard_code_conversion_x.h" | 32 #include "ui/base/keycodes/keyboard_code_conversion_x.h" |
33 #elif defined(TOOLKIT_USES_GTK) | 33 #elif defined(TOOLKIT_USES_GTK) |
34 #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" | 34 #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" |
35 #endif | 35 #endif |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 // A global flag to switch the InputMethod implementation to InputMethodIBus | 39 // A global flag to switch the InputMethod implementation to InputMethodIBus |
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 DCHECK_EQ(GetIBus(), bus); | 952 DCHECK_EQ(GetIBus(), bus); |
953 DCHECK(data); | 953 DCHECK(data); |
954 IBusInputContext* ic = | 954 IBusInputContext* ic = |
955 ibus_bus_create_input_context_async_finish(bus, res, NULL); | 955 ibus_bus_create_input_context_async_finish(bus, res, NULL); |
956 if (ic) | 956 if (ic) |
957 data->StoreOrAbandonInputContext(ic); | 957 data->StoreOrAbandonInputContext(ic); |
958 delete data; | 958 delete data; |
959 } | 959 } |
960 | 960 |
961 } // namespace views | 961 } // namespace views |
OLD | NEW |