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

Side by Side Diff: sky/engine/public/sky/sky_view.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 unified diff | Download patch
« no previous file with comments | « sky/engine/public/platform/WebInputEvent.h ('k') | sky/examples/raw/hello_world.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "sky/engine/public/sky/sky_view.h" 6 #include "sky/engine/public/sky/sky_view.h"
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "sky/engine/core/events/GestureEvent.h" 10 #include "sky/engine/core/events/GestureEvent.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 data_->view_->handleInputEvent(PointerEvent::create(event)); 84 data_->view_->handleInputEvent(PointerEvent::create(event));
85 } else if (WebInputEvent::isGestureEventType(inputEvent.type)) { 85 } else if (WebInputEvent::isGestureEventType(inputEvent.type)) {
86 const WebGestureEvent& event = static_cast<const WebGestureEvent&>(inputEv ent); 86 const WebGestureEvent& event = static_cast<const WebGestureEvent&>(inputEv ent);
87 data_->view_->handleInputEvent(GestureEvent::create(event)); 87 data_->view_->handleInputEvent(GestureEvent::create(event));
88 } else if (WebInputEvent::isKeyboardEventType(inputEvent.type)) { 88 } else if (WebInputEvent::isKeyboardEventType(inputEvent.type)) {
89 const WebKeyboardEvent& event = static_cast<const WebKeyboardEvent&>(input Event); 89 const WebKeyboardEvent& event = static_cast<const WebKeyboardEvent&>(input Event);
90 data_->view_->handleInputEvent(KeyboardEvent::create(event)); 90 data_->view_->handleInputEvent(KeyboardEvent::create(event));
91 } else if (WebInputEvent::isWheelEventType(inputEvent.type)) { 91 } else if (WebInputEvent::isWheelEventType(inputEvent.type)) {
92 const WebWheelEvent& event = static_cast<const WebWheelEvent&>(inputEvent) ; 92 const WebWheelEvent& event = static_cast<const WebWheelEvent&>(inputEvent) ;
93 data_->view_->handleInputEvent(WheelEvent::create(event)); 93 data_->view_->handleInputEvent(WheelEvent::create(event));
94 } else if (inputEvent.type == WebInputEvent::Back) {
95 data_->view_->handleInputEvent(Event::create("back"));
94 } 96 }
95 97
96 } 98 }
97 99
98 void SkyView::ScheduleFrame() { 100 void SkyView::ScheduleFrame() {
99 client_->ScheduleFrame(); 101 client_->ScheduleFrame();
100 } 102 }
101 103
102 } // namespace blink 104 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/public/platform/WebInputEvent.h ('k') | sky/examples/raw/hello_world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698