| OLD | NEW |
| 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 "mandoline/ui/aura/native_widget_view_manager.h" | 5 #include "mandoline/ui/aura/native_widget_view_manager.h" |
| 6 | 6 |
| 7 #include "mandoline/ui/aura/input_method_mandoline.h" | 7 #include "mandoline/ui/aura/input_method_mandoline.h" |
| 8 #include "mandoline/ui/aura/window_tree_host_mojo.h" | 8 #include "mandoline/ui/aura/window_tree_host_mojo.h" |
| 9 #include "mojo/converters/geometry/geometry_type_converters.h" | 9 #include "mojo/converters/geometry/geometry_type_converters.h" |
| 10 #include "mojo/converters/input_events/input_events_type_converters.h" | 10 #include "mojo/converters/input_events/input_events_type_converters.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 | 102 |
| 103 void NativeWidgetViewManager::OnViewInputEvent(mojo::View* view, | 103 void NativeWidgetViewManager::OnViewInputEvent(mojo::View* view, |
| 104 const mojo::EventPtr& event) { | 104 const mojo::EventPtr& event) { |
| 105 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event>>()); | 105 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event>>()); |
| 106 if (!ui_event) | 106 if (!ui_event) |
| 107 return; | 107 return; |
| 108 | 108 |
| 109 if (ui_event->IsKeyEvent()) { | 109 if (ui_event->IsKeyEvent()) { |
| 110 window_tree_host_->GetInputMethod()->DispatchKeyEvent( | 110 window_tree_host_->GetInputMethod()->DispatchKeyEvent( |
| 111 *static_cast<ui::KeyEvent*>(ui_event.get())); | 111 static_cast<ui::KeyEvent*>(ui_event.get())); |
| 112 ui_event->StopPropagation(); | |
| 113 } else { | 112 } else { |
| 114 window_tree_host_->SendEventToProcessor(ui_event.get()); | 113 window_tree_host_->SendEventToProcessor(ui_event.get()); |
| 115 } | 114 } |
| 116 } | 115 } |
| 117 | 116 |
| 118 } // namespace mandoline | 117 } // namespace mandoline |
| OLD | NEW |