| 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/screen_util.h" | 5 #include "ash/screen_util.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_shelf_aura.h" | 7 #include "ash/aura/wm_shelf_aura.h" |
| 8 #include "ash/display/display_manager.h" | |
| 9 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 10 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 11 #include "base/logging.h" | 10 #include "base/logging.h" |
| 12 #include "ui/aura/client/screen_position_client.h" | 11 #include "ui/aura/client/screen_position_client.h" |
| 13 #include "ui/aura/window_event_dispatcher.h" | 12 #include "ui/aura/window_event_dispatcher.h" |
| 14 #include "ui/display/display.h" | 13 #include "ui/display/display.h" |
| 14 #include "ui/display/manager/display_manager.h" |
| 15 #include "ui/display/screen.h" | 15 #include "ui/display/screen.h" |
| 16 #include "ui/gfx/geometry/size_conversions.h" | 16 #include "ui/gfx/geometry/size_conversions.h" |
| 17 | 17 |
| 18 namespace ash { | 18 namespace ash { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 DisplayManager* GetDisplayManager() { | 21 display::DisplayManager* GetDisplayManager() { |
| 22 return Shell::GetInstance()->display_manager(); | 22 return Shell::GetInstance()->display_manager(); |
| 23 } | 23 } |
| 24 } | 24 } |
| 25 | 25 |
| 26 // static | 26 // static |
| 27 display::Display ScreenUtil::FindDisplayContainingPoint( | 27 display::Display ScreenUtil::FindDisplayContainingPoint( |
| 28 const gfx::Point& point) { | 28 const gfx::Point& point) { |
| 29 return GetDisplayManager()->FindDisplayContainingPoint(point); | 29 return GetDisplayManager()->FindDisplayContainingPoint(point); |
| 30 } | 30 } |
| 31 | 31 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 const gfx::Rect& rect) { | 67 const gfx::Rect& rect) { |
| 68 gfx::Point point = rect.origin(); | 68 gfx::Point point = rect.origin(); |
| 69 aura::client::GetScreenPositionClient(window->GetRootWindow()) | 69 aura::client::GetScreenPositionClient(window->GetRootWindow()) |
| 70 ->ConvertPointFromScreen(window, &point); | 70 ->ConvertPointFromScreen(window, &point); |
| 71 return gfx::Rect(point, rect.size()); | 71 return gfx::Rect(point, rect.size()); |
| 72 } | 72 } |
| 73 | 73 |
| 74 // static | 74 // static |
| 75 | 75 |
| 76 } // namespace ash | 76 } // namespace ash |
| OLD | NEW |