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 root_window->GetHost() | 489 static_cast<ui::EventTarget*>(root_window) |
490 ->dispatcher() | 490 ->GetEventTargeter() |
491 ->GetDefaultEventTargeter() | |
492 ->FindTargetForEvent(root_window, &test_event); | 491 ->FindTargetForEvent(root_window, &test_event); |
493 return WmWindow::Get(static_cast<aura::Window*>(event_handler)); | 492 return WmWindow::Get(static_cast<aura::Window*>(event_handler)); |
494 } | 493 } |
495 | 494 |
496 gfx::Point RootWindowController::GetLastMouseLocationInRoot() { | 495 gfx::Point RootWindowController::GetLastMouseLocationInRoot() { |
497 return window_tree_host_->dispatcher()->GetLastMouseLocationInRoot(); | 496 return window_tree_host_->dispatcher()->GetLastMouseLocationInRoot(); |
498 } | 497 } |
499 | 498 |
500 aura::Window* RootWindowController::GetContainer(int container_id) { | 499 aura::Window* RootWindowController::GetContainer(int container_id) { |
501 return GetRootWindow()->GetChildById(container_id); | 500 return GetRootWindow()->GetChildById(container_id); |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 EnableTouchHudProjection(); | 1154 EnableTouchHudProjection(); |
1156 else | 1155 else |
1157 DisableTouchHudProjection(); | 1156 DisableTouchHudProjection(); |
1158 } | 1157 } |
1159 | 1158 |
1160 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1159 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
1161 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1160 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
1162 } | 1161 } |
1163 | 1162 |
1164 } // namespace ash | 1163 } // namespace ash |
OLD | NEW |