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

Unified Diff: content/renderer/pepper/usb_key_code_conversion_linux.cc

Issue 494813002: events: keycodes: Remove the stateless singleton instance of KeycodeConverter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | « content/public/test/browser_test_utils.cc ('k') | content/renderer/pepper/usb_key_code_conversion_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/usb_key_code_conversion_linux.cc
diff --git a/content/renderer/pepper/usb_key_code_conversion_linux.cc b/content/renderer/pepper/usb_key_code_conversion_linux.cc
index 8b9a4a52181cab52d53b502cd12cf11405d073f4..09ff82bb04a5705cb47182029f83ad87b78857da 100644
--- a/content/renderer/pepper/usb_key_code_conversion_linux.cc
+++ b/content/renderer/pepper/usb_key_code_conversion_linux.cc
@@ -17,13 +17,12 @@ uint32_t UsbKeyCodeForKeyboardEvent(const WebKeyboardEvent& key_event) {
// the XKB driver. We should detect between "XKB", "kbd" and "evdev" at
// run-time and re-map accordingly, but that's not possible here, inside the
// sandbox.
- ui::KeycodeConverter* key_converter = ui::KeycodeConverter::GetInstance();
- return key_converter->NativeKeycodeToUsbKeycode(key_event.nativeKeyCode);
+ return ui::KeycodeConverter::NativeKeycodeToUsbKeycode(
+ key_event.nativeKeyCode);
}
const char* CodeForKeyboardEvent(const WebKeyboardEvent& key_event) {
- ui::KeycodeConverter* key_converter = ui::KeycodeConverter::GetInstance();
- return key_converter->NativeKeycodeToCode(key_event.nativeKeyCode);
+ return ui::KeycodeConverter::NativeKeycodeToCode(key_event.nativeKeyCode);
}
} // namespace content
« no previous file with comments | « content/public/test/browser_test_utils.cc ('k') | content/renderer/pepper/usb_key_code_conversion_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698