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

Unified Diff: ui/keyboard/keyboard_util.cc

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build Created 6 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 | « ui/events/x/events_x_unittest.cc ('k') | ui/platform_window/win/win_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_util.cc
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc
index de9e2e4e1d79cdb5624fb42f61eecf0c9fa7217c..0be99e2f583651beb24ca3a395be55be45dd0ac8 100644
--- a/ui/keyboard/keyboard_util.cc
+++ b/ui/keyboard/keyboard_util.cc
@@ -28,7 +28,7 @@ const char kKeyUp[] = "keyup";
void SendProcessKeyEvent(ui::EventType type,
aura::WindowTreeHost* host) {
- ui::KeyEvent event(type, ui::VKEY_PROCESSKEY, ui::EF_NONE, false);
+ ui::KeyEvent event(type, ui::VKEY_PROCESSKEY, ui::EF_NONE);
event.SetTranslated(true);
ui::EventDispatchDetails details =
host->event_processor()->OnEventFromSource(&event);
@@ -208,22 +208,22 @@ bool MoveCursor(int swipe_direction,
// First deal with the x movement.
if (codex != ui::VKEY_UNKNOWN) {
- ui::KeyEvent press_event(ui::ET_KEY_PRESSED, codex, modifier_flags, 0);
+ ui::KeyEvent press_event(ui::ET_KEY_PRESSED, codex, modifier_flags);
ui::EventDispatchDetails details =
host->event_processor()->OnEventFromSource(&press_event);
CHECK(!details.dispatcher_destroyed);
- ui::KeyEvent release_event(ui::ET_KEY_RELEASED, codex, modifier_flags, 0);
+ ui::KeyEvent release_event(ui::ET_KEY_RELEASED, codex, modifier_flags);
details = host->event_processor()->OnEventFromSource(&release_event);
CHECK(!details.dispatcher_destroyed);
}
// Then deal with the y movement.
if (codey != ui::VKEY_UNKNOWN) {
- ui::KeyEvent press_event(ui::ET_KEY_PRESSED, codey, modifier_flags, 0);
+ ui::KeyEvent press_event(ui::ET_KEY_PRESSED, codey, modifier_flags);
ui::EventDispatchDetails details =
host->event_processor()->OnEventFromSource(&press_event);
CHECK(!details.dispatcher_destroyed);
- ui::KeyEvent release_event(ui::ET_KEY_RELEASED, codey, modifier_flags, 0);
+ ui::KeyEvent release_event(ui::ET_KEY_RELEASED, codey, modifier_flags);
details = host->event_processor()->OnEventFromSource(&release_event);
CHECK(!details.dispatcher_destroyed);
}
@@ -277,7 +277,7 @@ bool SendKeyEvent(const std::string type,
}
}
- ui::KeyEvent event(event_type, code, key_name, modifiers, false);
+ ui::KeyEvent event(event_type, code, key_name, modifiers);
ui::EventDispatchDetails details =
host->event_processor()->OnEventFromSource(&event);
CHECK(!details.dispatcher_destroyed);
« no previous file with comments | « ui/events/x/events_x_unittest.cc ('k') | ui/platform_window/win/win_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698