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

Side by Side Diff: ui/events/keycodes/dom4/keycode_converter.h

Issue 756643006: Remote assistance on Chrome OS Part IX - Input injection on Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Ozone_input_injection
Patch Set: Address feedback (wez) Created 6 years 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 | « remoting/remoting_test.gypi ('k') | ui/events/keycodes/dom4/keycode_converter.cc » ('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 #ifndef UI_EVENTS_KEYCODES_DOM4_KEYCODE_CONVERTER_H_ 5 #ifndef UI_EVENTS_KEYCODES_DOM4_KEYCODE_CONVERTER_H_
6 #define UI_EVENTS_KEYCODES_DOM4_KEYCODE_CONVERTER_H_ 6 #define UI_EVENTS_KEYCODES_DOM4_KEYCODE_CONVERTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Convert a USB keycode into an equivalent platform native keycode. 78 // Convert a USB keycode into an equivalent platform native keycode.
79 static int UsbKeycodeToNativeKeycode(uint32_t usb_keycode); 79 static int UsbKeycodeToNativeKeycode(uint32_t usb_keycode);
80 80
81 // Convert a platform native keycode into an equivalent USB keycode. 81 // Convert a platform native keycode into an equivalent USB keycode.
82 static uint32_t NativeKeycodeToUsbKeycode(int native_keycode); 82 static uint32_t NativeKeycodeToUsbKeycode(int native_keycode);
83 83
84 // Convert a USB keycode into the string with the DOM3 |code| value. 84 // Convert a USB keycode into the string with the DOM3 |code| value.
85 // The returned pointer references a static global string. 85 // The returned pointer references a static global string.
86 static const char* UsbKeycodeToCode(uint32_t usb_keycode); 86 static const char* UsbKeycodeToCode(uint32_t usb_keycode);
87 87
88 // Convert a USB keycode into a DomCode.
89 static DomCode UsbKeycodeToDomCode(uint32_t usb_keycode);
90
88 // Convert a DOM3 Event |code| string into a USB keycode value. 91 // Convert a DOM3 Event |code| string into a USB keycode value.
89 static uint32_t CodeToUsbKeycode(const char* code); 92 static uint32_t CodeToUsbKeycode(const char* code);
90 93
91 // Static methods to support testing. 94 // Static methods to support testing.
92 static size_t NumKeycodeMapEntriesForTest(); 95 static size_t NumKeycodeMapEntriesForTest();
93 static const KeycodeMapEntry* GetKeycodeMapForTest(); 96 static const KeycodeMapEntry* GetKeycodeMapForTest();
94 static const char* DomKeyStringForTest(size_t index); 97 static const char* DomKeyStringForTest(size_t index);
95 98
96 private: 99 private:
97 DISALLOW_COPY_AND_ASSIGN(KeycodeConverter); 100 DISALLOW_COPY_AND_ASSIGN(KeycodeConverter);
98 }; 101 };
99 102
100 } // namespace ui 103 } // namespace ui
101 104
102 #endif // UI_EVENTS_KEYCODES_DOM4_KEYCODE_CONVERTER_H_ 105 #endif // UI_EVENTS_KEYCODES_DOM4_KEYCODE_CONVERTER_H_
OLDNEW
« no previous file with comments | « remoting/remoting_test.gypi ('k') | ui/events/keycodes/dom4/keycode_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698