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

Unified Diff: content/browser/renderer_host/input/web_input_event_builders_android.cc

Issue 1308063007: Generate non-located windowsKeyCode for the WebInputEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittests Created 5 years, 3 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 | « no previous file | content/browser/renderer_host/input/web_input_event_builders_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/web_input_event_builders_android.cc
diff --git a/content/browser/renderer_host/input/web_input_event_builders_android.cc b/content/browser/renderer_host/input/web_input_event_builders_android.cc
index 0e17e05419bcc092f99feebc94cdfefa74743e48..6ec1614c81df2df87573b85ba2f0022dbbbe9615 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_android.cc
+++ b/content/browser/renderer_host/input/web_input_event_builders_android.cc
@@ -7,9 +7,9 @@
#include "base/logging.h"
#include "content/browser/renderer_host/input/motion_event_android.h"
#include "content/browser/renderer_host/input/web_input_event_util.h"
-#include "content/browser/renderer_host/input/web_input_event_util_posix.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
+#include "ui/events/keycodes/keyboard_code_conversion.h"
#include "ui/events/keycodes/keyboard_code_conversion_android.h"
#include "ui/events/keycodes/keyboard_codes_posix.h"
@@ -39,10 +39,9 @@ WebKeyboardEvent WebKeyboardEventBuilder::Build(WebInputEvent::Type type,
result.type = type;
result.modifiers = modifiers;
result.timeStampSeconds = time_sec;
- ui::KeyboardCode windows_key_code =
- ui::KeyboardCodeFromAndroidKeyCode(keycode);
- UpdateWindowsKeyCodeAndKeyIdentifier(&result, windows_key_code);
- result.modifiers |= GetLocationModifiersFromWindowsKeyCode(windows_key_code);
+ result.windowsKeyCode = ui::LocatedToNonLocatedKeyboardCode(
+ ui::KeyboardCodeFromAndroidKeyCode(keycode));
+ result.modifiers |= DomCodeToWebInputEventModifiers(dom_code);
result.nativeKeyCode = keycode;
result.domCode = static_cast<int>(dom_code);
result.unmodifiedText[0] = unicode_character;
@@ -54,6 +53,7 @@ WebKeyboardEvent WebKeyboardEventBuilder::Build(WebInputEvent::Type type,
}
result.text[0] = result.unmodifiedText[0];
result.isSystemKey = is_system_key;
+ result.setKeyIdentifierFromWindowsKeyCode();
return result;
}
« no previous file with comments | « no previous file | content/browser/renderer_host/input/web_input_event_builders_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698