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

Unified Diff: content/browser/renderer_host/web_input_event_aura.cc

Issue 1348843002: Revert of [KeyEvent Mac] Move WebInputEventFactory into chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/web_input_event_aura.cc
diff --git a/content/browser/renderer_host/web_input_event_aura.cc b/content/browser/renderer_host/web_input_event_aura.cc
index 7745d4951f112add4a9eb67b2e8fd78c43d0335b..0a7e8b5d877e955472542f7e7c6d8fa444ddc875 100644
--- a/content/browser/renderer_host/web_input_event_aura.cc
+++ b/content/browser/renderer_host/web_input_event_aura.cc
@@ -31,6 +31,21 @@
gfx::Point screen_location(event.root_location());
spc->ConvertPointToScreen(root, &screen_location);
return screen_location;
+}
+
+blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers(
+ ui::DomCode code) {
+ switch (ui::KeycodeConverter::DomCodeToLocation(code)) {
+ case ui::DomKeyLocation::LEFT:
+ return blink::WebInputEvent::IsLeft;
+ case ui::DomKeyLocation::RIGHT:
+ return blink::WebInputEvent::IsRight;
+ case ui::DomKeyLocation::NUMPAD:
+ return blink::WebInputEvent::IsKeyPad;
+ case ui::DomKeyLocation::STANDARD:
+ break;
+ }
+ return static_cast<blink::WebInputEvent::Modifiers>(0);
}
blink::WebPointerProperties::PointerType EventPointerTypeToWebPointerType(
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698