| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef SERVICES_UI_WS_WINDOW_FINDER_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_FINDER_H_ |
| 6 #define SERVICES_UI_WS_WINDOW_FINDER_H_ | 6 #define SERVICES_UI_WS_WINDOW_FINDER_H_ |
| 7 | 7 |
| 8 namespace gfx { | 8 namespace gfx { |
| 9 class Point; | 9 class Point; |
| 10 class Transform; | 10 class Transform; |
| 11 } | 11 } |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 namespace ws { | 14 namespace ws { |
| 15 | 15 |
| 16 class ServerWindow; | 16 class ServerWindow; |
| 17 | 17 |
| 18 struct DeepestWindow { | 18 struct DeepestWindow { |
| 19 ServerWindow* window = nullptr; | 19 ServerWindow* window = nullptr; |
| 20 bool in_non_client_area = false; | 20 bool in_non_client_area = false; |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 // Finds the deepest visible child of |root| that should receive an event at | 23 // Finds the deepest visible child of |root| that should receive an event at |
| 24 // |location|. |location| is in the coordinate space of |root_window|. The | 24 // |location|. |location| is in the coordinate space of |root_window|. The |
| 25 // |window| field in the returned structure is set to the child window. If no | 25 // |window| field in the returned structure is set to the child window. If no |
| 26 // valid child window is found |window| is set to null. | 26 // valid child window is found |window| is set to null. |
| 27 DeepestWindow FindDeepestVisibleWindowForEvents(ServerWindow* root_window, | 27 DeepestWindow FindDeepestVisibleWindowForLocation(ServerWindow* root_window, |
| 28 const gfx::Point& location); | 28 const gfx::Point& location); |
| 29 | 29 |
| 30 // Retrieve the transform to the provided |window|'s coordinate space from the | 30 // Retrieve the transform to the provided |window|'s coordinate space from the |
| 31 // root. | 31 // root. |
| 32 gfx::Transform GetTransformToWindow(ServerWindow* window); | 32 gfx::Transform GetTransformToWindow(ServerWindow* window); |
| 33 | 33 |
| 34 } // namespace ws | 34 } // namespace ws |
| 35 } // namespace ui | 35 } // namespace ui |
| 36 | 36 |
| 37 #endif // SERVICES_UI_WS_WINDOW_FINDER_H_ | 37 #endif // SERVICES_UI_WS_WINDOW_FINDER_H_ |
| OLD | NEW |