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/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
8 #include "ash/display/window_tree_host_manager.h" | 8 #include "ash/display/window_tree_host_manager.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/root_window_settings.h" | 10 #include "ash/root_window_settings.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) { | 127 void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) { |
128 FOR_EACH_OBSERVER( | 128 FOR_EACH_OBSERVER( |
129 gfx::DisplayObserver, observers_, OnDisplayRemoved(display)); | 129 gfx::DisplayObserver, observers_, OnDisplayRemoved(display)); |
130 } | 130 } |
131 | 131 |
132 gfx::Point ScreenAsh::GetCursorScreenPoint() { | 132 gfx::Point ScreenAsh::GetCursorScreenPoint() { |
133 return aura::Env::GetInstance()->last_mouse_location(); | 133 return aura::Env::GetInstance()->last_mouse_location(); |
134 } | 134 } |
135 | 135 |
136 gfx::NativeWindow ScreenAsh::GetWindowUnderCursor() { | 136 gfx::NativeWindow ScreenAsh::GetWindowUnderCursor() { |
137 return GetWindowAtScreenPoint(Shell::GetScreen()->GetCursorScreenPoint()); | 137 return GetWindowAtScreenPoint( |
| 138 gfx::Screen::GetScreen()->GetCursorScreenPoint()); |
138 } | 139 } |
139 | 140 |
140 gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) { | 141 gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) { |
141 aura::Window* root_window = wm::GetRootWindowAt(point); | 142 aura::Window* root_window = wm::GetRootWindowAt(point); |
142 aura::client::ScreenPositionClient* position_client = | 143 aura::client::ScreenPositionClient* position_client = |
143 aura::client::GetScreenPositionClient(root_window); | 144 aura::client::GetScreenPositionClient(root_window); |
144 | 145 |
145 gfx::Point local_point = point; | 146 gfx::Point local_point = point; |
146 if (position_client) | 147 if (position_client) |
147 position_client->ConvertPointFromScreen(root_window, &local_point); | 148 position_client->ConvertPointFromScreen(root_window, &local_point); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 212 |
212 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { | 213 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { |
213 observers_.RemoveObserver(observer); | 214 observers_.RemoveObserver(observer); |
214 } | 215 } |
215 | 216 |
216 gfx::Screen* ScreenAsh::CloneForShutdown() { | 217 gfx::Screen* ScreenAsh::CloneForShutdown() { |
217 return new ScreenForShutdown(this); | 218 return new ScreenForShutdown(this); |
218 } | 219 } |
219 | 220 |
220 } // namespace ash | 221 } // namespace ash |
OLD | NEW |