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

Unified Diff: remoting/host/linux/unicode_to_keysym.cc

Issue 2346643003: [Remoting Host] Handle text event characters that are not presented on the keyboard (Closed)
Patch Set: Reviewer's Feedback Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/linux/unicode_to_keysym.h ('k') | remoting/host/linux/unicode_to_keysym_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/linux/unicode_to_keysym.cc
diff --git a/remoting/host/linux/unicode_to_keysym.cc b/remoting/host/linux/unicode_to_keysym.cc
index c6fc2b333303a4674fd2f68f0fe62de8b032ec42..3f28185eaca311cd639630f2fdaac0d7f8103540 100644
--- a/remoting/host/linux/unicode_to_keysym.cc
+++ b/remoting/host/linux/unicode_to_keysym.cc
@@ -821,24 +821,25 @@ bool CompareCodePair(const CodePair& pair, uint32_t unicode) {
} // namespace
-void GetKeySymsForUnicode(uint32_t unicode, std::vector<uint32_t>* keysyms) {
- keysyms->clear();
+std::vector<uint32_t> GetKeySymsForUnicode(uint32_t unicode) {
+ std::vector<uint32_t> keysyms;
// Latin-1 characters have the same values in Unicode and KeySym.
if ((unicode >= 0x0020 && unicode <= 0x007e) ||
(unicode >= 0x00a0 && unicode <= 0x00ff)) {
- keysyms->push_back(unicode);
+ keysyms.push_back(unicode);
}
const CodePair* map_end = kKeySymUnicodeMap + arraysize(kKeySymUnicodeMap);
const CodePair* pair =
std::lower_bound(kKeySymUnicodeMap, map_end, unicode, &CompareCodePair);
while (pair != map_end && pair->unicode == unicode) {
- keysyms->push_back(pair->keysym);
+ keysyms.push_back(pair->keysym);
++pair;
}
- keysyms->push_back(0x01000000 | unicode);
+ keysyms.push_back(0x01000000 | unicode);
+ return keysyms;
}
} // namespace remoting
« no previous file with comments | « remoting/host/linux/unicode_to_keysym.h ('k') | remoting/host/linux/unicode_to_keysym_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698