Chromium Code Reviews| 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/thread_task_runner_handle.h" | 7 #include "base/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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 190 } | 190 } |
| 191 return input_method_; | 191 return input_method_; |
| 192 } | 192 } |
| 193 | 193 |
| 194 void WindowTreeHost::SetSharedInputMethod(ui::InputMethod* input_method) { | 194 void WindowTreeHost::SetSharedInputMethod(ui::InputMethod* input_method) { |
| 195 DCHECK(!input_method_); | 195 DCHECK(!input_method_); |
| 196 input_method_ = input_method; | 196 input_method_ = input_method; |
| 197 owned_input_method_ = false; | 197 owned_input_method_ = false; |
| 198 } | 198 } |
| 199 | 199 |
| 200 bool WindowTreeHost::DispatchKeyEventPostIME(const ui::KeyEvent& event) { | 200 bool WindowTreeHost::DispatchKeyEventPostIME(const ui::KeyEvent& event) { |
|
James Su
2015/06/25 13:38:23
I'd still prefer to change this method parameter t
Shu Chen
2015/06/26 02:05:20
This can be a separated cl. Let's keep the cl as s
| |
| 201 ui::KeyEvent copied_event(event); | 201 ui::KeyEvent copied_event(event); |
| 202 ui::EventDispatchDetails details = | 202 ui::EventDispatchDetails details = |
| 203 event_processor()->OnEventFromSource(&copied_event); | 203 event_processor()->OnEventFromSource(&copied_event); |
| 204 DCHECK(!details.dispatcher_destroyed); | 204 DCHECK(!details.dispatcher_destroyed); |
| 205 return copied_event.handled(); | 205 return copied_event.stopped_propagation(); |
|
James Su
2015/06/25 13:38:23
And we can return ui::EventDispatchDetails. Above
Shu Chen
2015/06/26 02:05:20
Ditto.
sadrul
2015/06/27 03:06:28
Can you please add a TODO here for both of these (
Shu Chen
2015/06/27 09:43:56
The TODO has already been added in the DeliverEven
| |
| 206 } | 206 } |
| 207 | 207 |
| 208 void WindowTreeHost::Show() { | 208 void WindowTreeHost::Show() { |
| 209 if (compositor()) | 209 if (compositor()) |
| 210 compositor()->SetVisible(true); | 210 compositor()->SetVisible(true); |
| 211 ShowImpl(); | 211 ShowImpl(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void WindowTreeHost::Hide() { | 214 void WindowTreeHost::Hide() { |
| 215 HideImpl(); | 215 HideImpl(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 334 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 334 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
| 335 if (cursor_client) { | 335 if (cursor_client) { |
| 336 const gfx::Display& display = | 336 const gfx::Display& display = |
| 337 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); | 337 gfx::Screen::GetScreenFor(window())->GetDisplayNearestWindow(window()); |
| 338 cursor_client->SetDisplay(display); | 338 cursor_client->SetDisplay(display); |
| 339 } | 339 } |
| 340 dispatcher()->OnCursorMovedToRootLocation(root_location); | 340 dispatcher()->OnCursorMovedToRootLocation(root_location); |
| 341 } | 341 } |
| 342 | 342 |
| 343 } // namespace aura | 343 } // namespace aura |
| OLD | NEW |