OLD | NEW |
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 #include "chrome/browser/chromeos/input_method/input_method_engine.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_engine.h" |
6 | 6 |
7 #undef FocusIn | 7 #undef FocusIn |
8 #undef FocusOut | 8 #undef FocusOut |
9 #undef RootWindow | 9 #undef RootWindow |
10 #include <map> | 10 #include <map> |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 segment != segments.end(); ++segment) { | 211 segment != segments.end(); ++segment) { |
212 CompositionText::UnderlineAttribute underline; | 212 CompositionText::UnderlineAttribute underline; |
213 | 213 |
214 switch (segment->style) { | 214 switch (segment->style) { |
215 case SEGMENT_STYLE_UNDERLINE: | 215 case SEGMENT_STYLE_UNDERLINE: |
216 underline.type = CompositionText::COMPOSITION_TEXT_UNDERLINE_SINGLE; | 216 underline.type = CompositionText::COMPOSITION_TEXT_UNDERLINE_SINGLE; |
217 break; | 217 break; |
218 case SEGMENT_STYLE_DOUBLE_UNDERLINE: | 218 case SEGMENT_STYLE_DOUBLE_UNDERLINE: |
219 underline.type = CompositionText::COMPOSITION_TEXT_UNDERLINE_DOUBLE; | 219 underline.type = CompositionText::COMPOSITION_TEXT_UNDERLINE_DOUBLE; |
220 break; | 220 break; |
| 221 case SEGMENT_STYLE_NO_UNDERLINE: |
| 222 underline.type = CompositionText::COMPOSITION_TEXT_UNDERLINE_NONE; |
| 223 break; |
221 default: | 224 default: |
222 continue; | 225 continue; |
223 } | 226 } |
224 | 227 |
225 underline.start_index = segment->start; | 228 underline.start_index = segment->start; |
226 underline.end_index = segment->end; | 229 underline.end_index = segment->end; |
227 composition_text_->mutable_underline_attributes()->push_back(underline); | 230 composition_text_->mutable_underline_attributes()->push_back(underline); |
228 } | 231 } |
229 | 232 |
230 // TODO(nona): Makes focus out mode configuable, if necessary. | 233 // TODO(nona): Makes focus out mode configuable, if necessary. |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 // TODO(nona): Implement it. | 681 // TODO(nona): Implement it. |
679 break; | 682 break; |
680 } | 683 } |
681 } | 684 } |
682 } | 685 } |
683 | 686 |
684 // TODO(nona): Support item.children. | 687 // TODO(nona): Support item.children. |
685 } | 688 } |
686 | 689 |
687 } // namespace chromeos | 690 } // namespace chromeos |
OLD | NEW |