OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <queue> | 8 #include <queue> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 | 479 |
480 WmWindow* RootWindowController::FindEventTarget( | 480 WmWindow* RootWindowController::FindEventTarget( |
481 const gfx::Point& location_in_screen) { | 481 const gfx::Point& location_in_screen) { |
482 gfx::Point location_in_root(location_in_screen); | 482 gfx::Point location_in_root(location_in_screen); |
483 aura::Window* root_window = GetRootWindow(); | 483 aura::Window* root_window = GetRootWindow(); |
484 ::wm::ConvertPointFromScreen(root_window, &location_in_root); | 484 ::wm::ConvertPointFromScreen(root_window, &location_in_root); |
485 ui::MouseEvent test_event(ui::ET_MOUSE_MOVED, location_in_root, | 485 ui::MouseEvent test_event(ui::ET_MOUSE_MOVED, location_in_root, |
486 location_in_root, ui::EventTimeForNow(), | 486 location_in_root, ui::EventTimeForNow(), |
487 ui::EF_NONE, ui::EF_NONE); | 487 ui::EF_NONE, ui::EF_NONE); |
488 ui::EventTarget* event_handler = | 488 ui::EventTarget* event_handler = |
489 static_cast<ui::EventTarget*>(root_window) | 489 root_window->GetHost() |
490 ->GetEventTargeter() | 490 ->dispatcher() |
| 491 ->GetDefaultEventTargeter() |
491 ->FindTargetForEvent(root_window, &test_event); | 492 ->FindTargetForEvent(root_window, &test_event); |
492 return WmWindow::Get(static_cast<aura::Window*>(event_handler)); | 493 return WmWindow::Get(static_cast<aura::Window*>(event_handler)); |
493 } | 494 } |
494 | 495 |
495 gfx::Point RootWindowController::GetLastMouseLocationInRoot() { | 496 gfx::Point RootWindowController::GetLastMouseLocationInRoot() { |
496 return window_tree_host_->dispatcher()->GetLastMouseLocationInRoot(); | 497 return window_tree_host_->dispatcher()->GetLastMouseLocationInRoot(); |
497 } | 498 } |
498 | 499 |
499 aura::Window* RootWindowController::GetContainer(int container_id) { | 500 aura::Window* RootWindowController::GetContainer(int container_id) { |
500 return GetRootWindow()->GetChildById(container_id); | 501 return GetRootWindow()->GetChildById(container_id); |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 EnableTouchHudProjection(); | 1155 EnableTouchHudProjection(); |
1155 else | 1156 else |
1156 DisableTouchHudProjection(); | 1157 DisableTouchHudProjection(); |
1157 } | 1158 } |
1158 | 1159 |
1159 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1160 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
1160 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1161 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
1161 } | 1162 } |
1162 | 1163 |
1163 } // namespace ash | 1164 } // namespace ash |
OLD | NEW |