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

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

Issue 2909603002: Revert of Remove InputMethodEventHandler. (Closed)
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/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/aura/client/capture_client.h" 9 #include "ui/aura/client/capture_client.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 187 }
188 188
189 void WindowTreeHost::SetSharedInputMethod(ui::InputMethod* input_method) { 189 void WindowTreeHost::SetSharedInputMethod(ui::InputMethod* input_method) {
190 DCHECK(!input_method_); 190 DCHECK(!input_method_);
191 input_method_ = input_method; 191 input_method_ = input_method;
192 owned_input_method_ = false; 192 owned_input_method_ = false;
193 } 193 }
194 194
195 ui::EventDispatchDetails WindowTreeHost::DispatchKeyEventPostIME( 195 ui::EventDispatchDetails WindowTreeHost::DispatchKeyEventPostIME(
196 ui::KeyEvent* event) { 196 ui::KeyEvent* event) {
197 // If dispatch to IME is already disabled we shouldn't reach here. 197 return SendEventToSink(event);
198 DCHECK(!dispatcher_->should_skip_ime());
199 dispatcher_->set_skip_ime(true);
200 ui::EventDispatchDetails dispatch_details = SendEventToSink(event);
201 if (!dispatch_details.dispatcher_destroyed)
202 dispatcher_->set_skip_ime(false);
203 return dispatch_details;
204 } 198 }
205 199
206 void WindowTreeHost::Show() { 200 void WindowTreeHost::Show() {
207 // Ensure that compositor has been properly initialized, see InitCompositor() 201 // Ensure that compositor has been properly initialized, see InitCompositor()
208 // and InitHost(). 202 // and InitHost().
209 DCHECK(compositor()); 203 DCHECK(compositor());
210 DCHECK_EQ(compositor()->root_layer(), window()->layer()); 204 DCHECK_EQ(compositor()->root_layer(), window()->layer());
211 compositor()->SetVisible(true); 205 compositor()->SetVisible(true);
212 ShowImpl(); 206 ShowImpl();
213 window()->Show(); 207 window()->Show();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 client::CursorClient* cursor_client = client::GetCursorClient(window()); 343 client::CursorClient* cursor_client = client::GetCursorClient(window());
350 if (cursor_client) { 344 if (cursor_client) {
351 const display::Display& display = 345 const display::Display& display =
352 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); 346 display::Screen::GetScreen()->GetDisplayNearestWindow(window());
353 cursor_client->SetDisplay(display); 347 cursor_client->SetDisplay(display);
354 } 348 }
355 dispatcher()->OnCursorMovedToRootLocation(root_location); 349 dispatcher()->OnCursorMovedToRootLocation(root_location);
356 } 350 }
357 351
358 } // namespace aura 352 } // 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