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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_engine.cc

Issue 639103003: Support invisible underline for IME composition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit. Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_engine_interface.h » ('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 #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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_engine_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698