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

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

Issue 2872343003: Remove InputMethodEventHandler. (Closed)
Patch Set: addressed feedback. Created 3 years, 7 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 return SendEventToSink(event); 197 // If dispatch to IME is already disabled we shouldn't reach here.
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;
198 } 204 }
199 205
200 void WindowTreeHost::Show() { 206 void WindowTreeHost::Show() {
201 // Ensure that compositor has been properly initialized, see InitCompositor() 207 // Ensure that compositor has been properly initialized, see InitCompositor()
202 // and InitHost(). 208 // and InitHost().
203 DCHECK(compositor()); 209 DCHECK(compositor());
204 DCHECK_EQ(compositor()->root_layer(), window()->layer()); 210 DCHECK_EQ(compositor()->root_layer(), window()->layer());
205 compositor()->SetVisible(true); 211 compositor()->SetVisible(true);
206 ShowImpl(); 212 ShowImpl();
207 window()->Show(); 213 window()->Show();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 client::CursorClient* cursor_client = client::GetCursorClient(window()); 349 client::CursorClient* cursor_client = client::GetCursorClient(window());
344 if (cursor_client) { 350 if (cursor_client) {
345 const display::Display& display = 351 const display::Display& display =
346 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); 352 display::Screen::GetScreen()->GetDisplayNearestWindow(window());
347 cursor_client->SetDisplay(display); 353 cursor_client->SetDisplay(display);
348 } 354 }
349 dispatcher()->OnCursorMovedToRootLocation(root_location); 355 dispatcher()->OnCursorMovedToRootLocation(root_location);
350 } 356 }
351 357
352 } // 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