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

Unified Diff: remoting/client/jni/android_keymap.cc

Issue 21236002: Chromoting Android app mouse/keyboard bugfixes and enhancements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One last (TODO) comment change Created 7 years, 5 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/client/jni/android_keymap.h ('k') | remoting/client/jni/chromoting_jni_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/android_keymap.cc
diff --git a/remoting/client/jni/android_keymap.cc b/remoting/client/jni/android_keymap.cc
index f42704661399f7832fd0579796fd11e9111904e2..743e15e3334619af1f588f4c79608cc382137f5f 100644
--- a/remoting/client/jni/android_keymap.cc
+++ b/remoting/client/jni/android_keymap.cc
@@ -4,6 +4,8 @@
#include "remoting/client/jni/android_keymap.h"
+#include "base/logging.h"
+
namespace {
// These must be defined in the same order as the Android keycodes in
@@ -201,7 +203,9 @@ const uint32 usb_keycodes[] = {
namespace remoting {
-uint32 AndroidKeycodeToUsbKeycode(int android) {
+uint32 AndroidKeycodeToUsbKeycode(size_t android) {
+ DCHECK_LT(android, sizeof (usb_keycodes) / sizeof (uint32));
+
return usb_keycodes[android];
}
« no previous file with comments | « remoting/client/jni/android_keymap.h ('k') | remoting/client/jni/chromoting_jni_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698