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

Side by Side Diff: ash/host/ash_window_tree_host_unified.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 | « ash/host/ash_window_tree_host_unified.h ('k') | ash/host/ash_window_tree_host_win.cc » ('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 "ash/host/ash_window_tree_host_unified.h" 5 #include "ash/host/ash_window_tree_host_unified.h"
6 #include "ash/host/root_window_transformer.h" 6 #include "ash/host/root_window_transformer.h"
7 #include "ash/ime/input_method_event_handler.h" 7 #include "ash/ime/input_method_event_handler.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/aura/window_event_dispatcher.h" 10 #include "ui/aura/window_event_dispatcher.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 auto iter = 170 auto iter =
171 std::find_if(mirroring_hosts_.begin(), mirroring_hosts_.end(), 171 std::find_if(mirroring_hosts_.begin(), mirroring_hosts_.end(),
172 [window](AshWindowTreeHost* ash_host) { 172 [window](AshWindowTreeHost* ash_host) {
173 return ash_host->AsWindowTreeHost()->window() == window; 173 return ash_host->AsWindowTreeHost()->window() == window;
174 }); 174 });
175 DCHECK(iter != mirroring_hosts_.end()); 175 DCHECK(iter != mirroring_hosts_.end());
176 window->RemoveObserver(this); 176 window->RemoveObserver(this);
177 mirroring_hosts_.erase(iter); 177 mirroring_hosts_.erase(iter);
178 } 178 }
179 179
180 bool AshWindowTreeHostUnified::DispatchKeyEventPostIME( 180 ui::EventDispatchDetails AshWindowTreeHostUnified::DispatchKeyEventPostIME(
181 const ui::KeyEvent& event) { 181 ui::KeyEvent* event) {
182 ui::KeyEvent event_copy(event);
183 input_method_handler()->SetPostIME(true); 182 input_method_handler()->SetPostIME(true);
184 ui::EventDispatchDetails details = 183 ui::EventDispatchDetails details =
185 event_processor()->OnEventFromSource(&event_copy); 184 event_processor()->OnEventFromSource(event);
186 if (details.dispatcher_destroyed) 185 if (!details.dispatcher_destroyed)
187 return true; 186 input_method_handler()->SetPostIME(false);
188 input_method_handler()->SetPostIME(false); 187 return details;
189 return event_copy.stopped_propagation();
190 } 188 }
191 189
192 } // namespace ash 190 } // namespace ash
OLDNEW
« no previous file with comments | « ash/host/ash_window_tree_host_unified.h ('k') | ash/host/ash_window_tree_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698