OLD | NEW |
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // If dispatch to IME is already disabled we shouldn't reach here. |
200 DCHECK(!dispatcher_->should_skip_ime()); | 200 DCHECK(!dispatcher_->should_skip_ime()); |
201 dispatcher_->set_skip_ime(true); | 201 dispatcher_->set_skip_ime(true); |
202 ui::EventDispatchDetails dispatch_details = SendEventToSink(event); | 202 // We should bypass event rewriters here as they've been tried before. |
| 203 ui::EventDispatchDetails dispatch_details = |
| 204 event_sink()->OnEventFromSource(event); |
203 if (!dispatch_details.dispatcher_destroyed) | 205 if (!dispatch_details.dispatcher_destroyed) |
204 dispatcher_->set_skip_ime(false); | 206 dispatcher_->set_skip_ime(false); |
205 return dispatch_details; | 207 return dispatch_details; |
206 } | 208 } |
207 | 209 |
208 void WindowTreeHost::Show() { | 210 void WindowTreeHost::Show() { |
209 // Ensure that compositor has been properly initialized, see InitCompositor() | 211 // Ensure that compositor has been properly initialized, see InitCompositor() |
210 // and InitHost(). | 212 // and InitHost(). |
211 DCHECK(compositor()); | 213 DCHECK(compositor()); |
212 DCHECK_EQ(compositor()->root_layer(), window()->layer()); | 214 DCHECK_EQ(compositor()->root_layer(), window()->layer()); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 357 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
356 if (cursor_client) { | 358 if (cursor_client) { |
357 const display::Display& display = | 359 const display::Display& display = |
358 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); | 360 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); |
359 cursor_client->SetDisplay(display); | 361 cursor_client->SetDisplay(display); |
360 } | 362 } |
361 dispatcher()->OnCursorMovedToRootLocation(root_location); | 363 dispatcher()->OnCursorMovedToRootLocation(root_location); |
362 } | 364 } |
363 | 365 |
364 } // namespace aura | 366 } // namespace aura |
OLD | NEW |