chrome/browser/chromeos/input_method/candidate_window_view.cc
// Creates shortcut text from the given index and the orientation.
Creates shortcut text from the given index and the orientation.
Creates shortcut text from the given index and the orientation .
string16 CreateShortcutText(int index,
                            const InputMethodLookupTable& table) {
  const char kShortcutCharacters[] = "1234567890ABCDEF";
  std::string shortcut_text = " ";
  if (table.labels.empty()) {
    if (index < static_cast<int>(arraysize(kShortcutCharacters) - 1))
      shortcut_text = std::string(1, kShortcutCharacters[index]);
  } else {
    if (index < static_cast<int>(table.labels.size()))
      shortcut_text = table.labels[index];
  }
  if (table.orientation != InputMethodLookupTable::kVertical)
    shortcut_text += '.';
  return UTF8ToUTF16(shortcut_text);
}
string16 CreateShortcutText ( int index , const InputMethodLookupTable & table ) { const char kShortcutCharacters [ ] = " " ; std :: string shortcut_text = " " ; if ( table . labels . empty ( ) ) { if ( index < static_cast < int > ( arraysize ( kShortcutCharacters ) - 1 ) ) shortcut_text = std :: string ( 1 , kShortcutCharacters [ index ] ) ; } else { if ( index < static_cast < int > ( table . labels . size ( ) ) ) shortcut_text = table . labels [ index ] ; } if ( table . orientation != InputMethodLookupTable :: kVertical ) shortcut_text += ' ' ; return UTF8ToUTF16 ( shortcut_text ) ; }
Creates shortcut text from the given index and the orientation.
Creates shortcut text from the given index and the orientation .
// Choose the character used for the shortcut label. // The default character should not be used but just in case. // -1 to exclude the null character at the end.