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

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

Issue 162723003: Migrate CandidateWindow::Entry to string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browsertest compilation Created 6 years, 10 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
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 #define XK_MISCELLANY 7 #define XK_MISCELLANY
8 #include <X11/keysymdef.h> 8 #include <X11/keysymdef.h>
9 #include <X11/X.h> 9 #include <X11/X.h>
10 #include <X11/Xlib.h> 10 #include <X11/Xlib.h>
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 return false; 308 return false;
309 } 309 }
310 310
311 // TODO: Nested candidates 311 // TODO: Nested candidates
312 candidate_ids_.clear(); 312 candidate_ids_.clear();
313 candidate_indexes_.clear(); 313 candidate_indexes_.clear();
314 candidate_window_->mutable_candidates()->clear(); 314 candidate_window_->mutable_candidates()->clear();
315 for (std::vector<Candidate>::const_iterator ix = candidates.begin(); 315 for (std::vector<Candidate>::const_iterator ix = candidates.begin();
316 ix != candidates.end(); ++ix) { 316 ix != candidates.end(); ++ix) {
317 ui::CandidateWindow::Entry entry; 317 ui::CandidateWindow::Entry entry;
318 entry.value = ix->value; 318 entry.value = base::UTF8ToUTF16(ix->value);
319 entry.label = ix->label; 319 entry.label = base::UTF8ToUTF16(ix->label);
320 entry.annotation = ix->annotation; 320 entry.annotation = base::UTF8ToUTF16(ix->annotation);
321 entry.description_title = ix->usage.title; 321 entry.description_title = base::UTF8ToUTF16(ix->usage.title);
322 entry.description_body = ix->usage.body; 322 entry.description_body = base::UTF8ToUTF16(ix->usage.body);
323 323
324 // Store a mapping from the user defined ID to the candidate index. 324 // Store a mapping from the user defined ID to the candidate index.
325 candidate_indexes_[ix->id] = candidate_ids_.size(); 325 candidate_indexes_[ix->id] = candidate_ids_.size();
326 candidate_ids_.push_back(ix->id); 326 candidate_ids_.push_back(ix->id);
327 327
328 candidate_window_->mutable_candidates()->push_back(entry); 328 candidate_window_->mutable_candidates()->push_back(entry);
329 } 329 }
330 if (active_) { 330 if (active_) {
331 IBusPanelCandidateWindowHandlerInterface* cw_handler = 331 IBusPanelCandidateWindowHandlerInterface* cw_handler =
332 IMEBridge::Get()->GetCandidateWindowHandler(); 332 IMEBridge::Get()->GetCandidateWindowHandler();
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 // TODO(nona): Implement it. 618 // TODO(nona): Implement it.
619 break; 619 break;
620 } 620 }
621 } 621 }
622 } 622 }
623 623
624 // TODO(nona): Support item.children. 624 // TODO(nona): Support item.children.
625 } 625 }
626 626
627 } // namespace chromeos 627 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698