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/base/gtk/gtk_im_context_util.h" | 5 #include "ui/base/gtk/gtk_im_context_util.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/i18n/char_iterator.h" | 8 #include "base/i18n/char_iterator.h" |
9 #include "base/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "ui/base/ime/composition_text.h" | 11 #include "ui/base/ime/composition_text.h" |
12 | 12 |
13 namespace ui { | 13 namespace ui { |
14 | 14 |
15 void ExtractCompositionTextFromGtkPreedit(const gchar* utf8_text, | 15 void ExtractCompositionTextFromGtkPreedit(const gchar* utf8_text, |
16 PangoAttrList* attrs, | 16 PangoAttrList* attrs, |
17 int cursor_position, | 17 int cursor_position, |
18 CompositionText* composition) { | 18 CompositionText* composition) { |
19 composition->Clear(); | 19 composition->Clear(); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 105 } |
106 | 106 |
107 // Use a black thin underline by default. | 107 // Use a black thin underline by default. |
108 if (composition->underlines.empty()) { | 108 if (composition->underlines.empty()) { |
109 composition->underlines.push_back( | 109 composition->underlines.push_back( |
110 CompositionUnderline(0, length, SK_ColorBLACK, false)); | 110 CompositionUnderline(0, length, SK_ColorBLACK, false)); |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 } // namespace ui | 114 } // namespace ui |
OLD | NEW |