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

Unified Diff: sky/shell/ui/input_event_converter.cc

Issue 1176373004: Wire up Android back button in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « sky/shell/android/org/domokit/sky/shell/SkyActivity.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/ui/input_event_converter.cc
diff --git a/sky/shell/ui/input_event_converter.cc b/sky/shell/ui/input_event_converter.cc
index bc890d0dae81c596f4733a55b9c58d430a9ded68..1e81bb1eca8f052fddf2c5162dcf53611a47a538 100644
--- a/sky/shell/ui/input_event_converter.cc
+++ b/sky/shell/ui/input_event_converter.cc
@@ -104,6 +104,12 @@ scoped_ptr<blink::WebInputEvent> BuildWebGestureEvent(
return web_event.Pass();
}
+scoped_ptr<blink::WebInputEvent> BuildWebBackEvent(const InputEventPtr& event) {
+ scoped_ptr<blink::WebInputEvent> web_event(blink::WebInputEvent::create());
+ web_event->type = blink::WebInputEvent::Back;
+ return web_event.Pass();
+}
+
} // namespace
scoped_ptr<blink::WebInputEvent> ConvertEvent(const InputEventPtr& event,
@@ -124,6 +130,8 @@ scoped_ptr<blink::WebInputEvent> ConvertEvent(const InputEventPtr& event,
case EVENT_TYPE_GESTURE_TAP:
case EVENT_TYPE_GESTURE_TAP_DOWN:
return BuildWebGestureEvent(event, device_pixel_ratio);
+ case EVENT_TYPE_BACK:
+ return BuildWebBackEvent(event);
case EVENT_TYPE_UNKNOWN:
NOTIMPLEMENTED() << "ConvertEvent received unexpected EVENT_TYPE_UNKNOWN";
}
« no previous file with comments | « sky/shell/android/org/domokit/sky/shell/SkyActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698