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

Side by Side Diff: ui/aura/window_tree_host.cc

Issue 2909063002: Revert of Remove InputMethodEventHandler.
Patch Set: Created 3 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 | « ui/aura/window_tree_host.h ('k') | ui/events/test/event_generator.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/aura/window_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 void WindowTreeHost::SetSharedInputMethod(ui::InputMethod* input_method) { 191 void WindowTreeHost::SetSharedInputMethod(ui::InputMethod* input_method) {
192 DCHECK(!input_method_); 192 DCHECK(!input_method_);
193 input_method_ = input_method; 193 input_method_ = input_method;
194 owned_input_method_ = false; 194 owned_input_method_ = false;
195 } 195 }
196 196
197 ui::EventDispatchDetails WindowTreeHost::DispatchKeyEventPostIME( 197 ui::EventDispatchDetails WindowTreeHost::DispatchKeyEventPostIME(
198 ui::KeyEvent* event) { 198 ui::KeyEvent* event) {
199 // If dispatch to IME is already disabled we shouldn't reach here. 199 return SendEventToSink(event);
200 DCHECK(!dispatcher_->should_skip_ime());
201 dispatcher_->set_skip_ime(true);
202 ui::EventDispatchDetails dispatch_details = SendEventToSink(event);
203 if (!dispatch_details.dispatcher_destroyed)
204 dispatcher_->set_skip_ime(false);
205 return dispatch_details;
206 } 200 }
207 201
208 void WindowTreeHost::Show() { 202 void WindowTreeHost::Show() {
209 // Ensure that compositor has been properly initialized, see InitCompositor() 203 // Ensure that compositor has been properly initialized, see InitCompositor()
210 // and InitHost(). 204 // and InitHost().
211 DCHECK(compositor()); 205 DCHECK(compositor());
212 DCHECK_EQ(compositor()->root_layer(), window()->layer()); 206 DCHECK_EQ(compositor()->root_layer(), window()->layer());
213 compositor()->SetVisible(true); 207 compositor()->SetVisible(true);
214 ShowImpl(); 208 ShowImpl();
215 window()->Show(); 209 window()->Show();
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 client::CursorClient* cursor_client = client::GetCursorClient(window()); 349 client::CursorClient* cursor_client = client::GetCursorClient(window());
356 if (cursor_client) { 350 if (cursor_client) {
357 const display::Display& display = 351 const display::Display& display =
358 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); 352 display::Screen::GetScreen()->GetDisplayNearestWindow(window());
359 cursor_client->SetDisplay(display); 353 cursor_client->SetDisplay(display);
360 } 354 }
361 dispatcher()->OnCursorMovedToRootLocation(root_location); 355 dispatcher()->OnCursorMovedToRootLocation(root_location);
362 } 356 }
363 357
364 } // namespace aura 358 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host.h ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698