| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) { | 92 void ScreenAsh::NotifyDisplayRemoved(const gfx::Display& display) { |
| 93 FOR_EACH_OBSERVER( | 93 FOR_EACH_OBSERVER( |
| 94 gfx::DisplayObserver, observers_, OnDisplayRemoved(display)); | 94 gfx::DisplayObserver, observers_, OnDisplayRemoved(display)); |
| 95 } | 95 } |
| 96 | 96 |
| 97 gfx::Point ScreenAsh::GetCursorScreenPoint() { | 97 gfx::Point ScreenAsh::GetCursorScreenPoint() { |
| 98 return aura::Env::GetInstance()->last_mouse_location(); | 98 return aura::Env::GetInstance()->last_mouse_location(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 gfx::NativeWindow ScreenAsh::GetWindowUnderCursor() { | 101 gfx::NativeWindow ScreenAsh::GetWindowUnderCursor() { |
| 102 return GetWindowAtScreenPoint(Shell::GetScreen()->GetCursorScreenPoint()); | 102 return GetWindowAtScreenPoint( |
| 103 gfx::Screen::GetScreen()->GetCursorScreenPoint()); |
| 103 } | 104 } |
| 104 | 105 |
| 105 gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) { | 106 gfx::NativeWindow ScreenAsh::GetWindowAtScreenPoint(const gfx::Point& point) { |
| 106 aura::Window* root_window = wm::GetRootWindowAt(point); | 107 aura::Window* root_window = wm::GetRootWindowAt(point); |
| 107 aura::client::ScreenPositionClient* position_client = | 108 aura::client::ScreenPositionClient* position_client = |
| 108 aura::client::GetScreenPositionClient(root_window); | 109 aura::client::GetScreenPositionClient(root_window); |
| 109 | 110 |
| 110 gfx::Point local_point = point; | 111 gfx::Point local_point = point; |
| 111 if (position_client) | 112 if (position_client) |
| 112 position_client->ConvertPointFromScreen(root_window, &local_point); | 113 position_client->ConvertPointFromScreen(root_window, &local_point); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 177 |
| 177 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { | 178 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { |
| 178 observers_.RemoveObserver(observer); | 179 observers_.RemoveObserver(observer); |
| 179 } | 180 } |
| 180 | 181 |
| 181 gfx::Screen* ScreenAsh::CloneForShutdown() { | 182 gfx::Screen* ScreenAsh::CloneForShutdown() { |
| 182 return new ScreenForShutdown(this); | 183 return new ScreenForShutdown(this); |
| 183 } | 184 } |
| 184 | 185 |
| 185 } // namespace ash | 186 } // namespace ash |
| OLD | NEW |