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

Side by Side Diff: mandoline/ui/aura/native_widget_view_manager.cc

Issue 1257603006: Refactoring for the InputMethod & InputMethodDelegate interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Sadrul's comment. Created 5 years, 4 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 | « mandoline/ui/aura/input_method_mandoline.cc ('k') | ui/aura/window_tree_host.h » ('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 "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
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
OLDNEW
« no previous file with comments | « mandoline/ui/aura/input_method_mandoline.cc ('k') | ui/aura/window_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698