Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/display/screen_ash.h" | 5 #include "ash/display/screen_ash.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/shelf_widget.h" | 7 #include "ash/common/shelf/shelf_widget.h" |
| 8 #include "ash/common/wm/root_window_finder.h" | 8 #include "ash/common/wm/root_window_finder.h" |
| 9 #include "ash/common/wm_window.h" | 9 #include "ash/common/wm_window.h" |
| 10 #include "ash/display/window_tree_host_manager.h" | 10 #include "ash/display/window_tree_host_manager.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) { | 97 gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) { |
| 98 aura::Window* root_window = | 98 aura::Window* root_window = |
| 99 WmWindow::GetAuraWindow(wm::GetRootWindowAt(point)); | 99 WmWindow::GetAuraWindow(wm::GetRootWindowAt(point)); |
| 100 aura::client::ScreenPositionClient* position_client = | 100 aura::client::ScreenPositionClient* position_client = |
| 101 aura::client::GetScreenPositionClient(root_window); | 101 aura::client::GetScreenPositionClient(root_window); |
| 102 | 102 |
| 103 gfx::Point local_point = point; | 103 gfx::Point local_point = point; |
| 104 if (position_client) | 104 if (position_client) |
| 105 position_client->ConvertPointFromScreen(root_window, &local_point); | 105 position_client->ConvertPointFromScreen(root_window, &local_point); |
| 106 | 106 |
| 107 return root_window->GetTopWindowContainingPoint(local_point); | 107 return root_window->GetEventHandlerForPoint(local_point); |
|
afakhry
2017/03/21 17:35:47
+Sadrul.
Oshima and talked about deprecating this
sadrul
2017/03/22 20:04:31
Can you clarify how this change fixes the bug you
afakhry
2017/03/22 20:29:33
Thanks.
GetTopWindowContaingPoint() on ARC++ devi
| |
| 108 } | 108 } |
| 109 | 109 |
| 110 int ScreenAsh::GetNumDisplays() const { | 110 int ScreenAsh::GetNumDisplays() const { |
| 111 return GetDisplayManager()->GetNumDisplays(); | 111 return GetDisplayManager()->GetNumDisplays(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 const std::vector<display::Display>& ScreenAsh::GetAllDisplays() const { | 114 const std::vector<display::Display>& ScreenAsh::GetAllDisplays() const { |
| 115 return GetDisplayManager()->active_display_list(); | 115 return GetDisplayManager()->active_display_list(); |
| 116 } | 116 } |
| 117 | 117 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 189 } | 189 } |
| 190 | 190 |
| 191 // static | 191 // static |
| 192 void ScreenAsh::CreateScreenForShutdown() { | 192 void ScreenAsh::CreateScreenForShutdown() { |
| 193 delete screen_for_shutdown; | 193 delete screen_for_shutdown; |
| 194 screen_for_shutdown = new ScreenForShutdown(display::Screen::GetScreen()); | 194 screen_for_shutdown = new ScreenForShutdown(display::Screen::GetScreen()); |
| 195 display::Screen::SetScreenInstance(screen_for_shutdown); | 195 display::Screen::SetScreenInstance(screen_for_shutdown); |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace ash | 198 } // namespace ash |
| OLD | NEW |