| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 473 |
| 474 WmWindow* RootWindowController::FindEventTarget( | 474 WmWindow* RootWindowController::FindEventTarget( |
| 475 const gfx::Point& location_in_screen) { | 475 const gfx::Point& location_in_screen) { |
| 476 gfx::Point location_in_root(location_in_screen); | 476 gfx::Point location_in_root(location_in_screen); |
| 477 aura::Window* root_window = GetRootWindow(); | 477 aura::Window* root_window = GetRootWindow(); |
| 478 ::wm::ConvertPointFromScreen(root_window, &location_in_root); | 478 ::wm::ConvertPointFromScreen(root_window, &location_in_root); |
| 479 ui::MouseEvent test_event(ui::ET_MOUSE_MOVED, location_in_root, | 479 ui::MouseEvent test_event(ui::ET_MOUSE_MOVED, location_in_root, |
| 480 location_in_root, ui::EventTimeForNow(), | 480 location_in_root, ui::EventTimeForNow(), |
| 481 ui::EF_NONE, ui::EF_NONE); | 481 ui::EF_NONE, ui::EF_NONE); |
| 482 ui::EventTarget* event_handler = | 482 ui::EventTarget* event_handler = |
| 483 static_cast<ui::EventTarget*>(root_window) | 483 root_window->GetHost() |
| 484 ->GetEventTargeter() | 484 ->dispatcher() |
| 485 ->GetDefaultEventTargeter() |
| 485 ->FindTargetForEvent(root_window, &test_event); | 486 ->FindTargetForEvent(root_window, &test_event); |
| 486 return WmWindow::Get(static_cast<aura::Window*>(event_handler)); | 487 return WmWindow::Get(static_cast<aura::Window*>(event_handler)); |
| 487 } | 488 } |
| 488 | 489 |
| 489 gfx::Point RootWindowController::GetLastMouseLocationInRoot() { | 490 gfx::Point RootWindowController::GetLastMouseLocationInRoot() { |
| 490 return window_tree_host_->dispatcher()->GetLastMouseLocationInRoot(); | 491 return window_tree_host_->dispatcher()->GetLastMouseLocationInRoot(); |
| 491 } | 492 } |
| 492 | 493 |
| 493 aura::Window* RootWindowController::GetContainer(int container_id) { | 494 aura::Window* RootWindowController::GetContainer(int container_id) { |
| 494 return GetRootWindow()->GetChildById(container_id); | 495 return GetRootWindow()->GetChildById(container_id); |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 EnableTouchHudProjection(); | 1149 EnableTouchHudProjection(); |
| 1149 else | 1150 else |
| 1150 DisableTouchHudProjection(); | 1151 DisableTouchHudProjection(); |
| 1151 } | 1152 } |
| 1152 | 1153 |
| 1153 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1154 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
| 1154 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1155 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
| 1155 } | 1156 } |
| 1156 | 1157 |
| 1157 } // namespace ash | 1158 } // namespace ash |
| OLD | NEW |