| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ash.h" | 5 #include "ash/screen_ash.h" |
| 6 | 6 |
| 7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
| 8 #include "ash/display/multi_display_manager.h" | 8 #include "ash/display/multi_display_manager.h" |
| 9 #include "ash/root_window_controller.h" |
| 9 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 11 #include "ash/wm/property_util.h" |
| 10 #include "ash/wm/coordinate_conversion.h" | 12 #include "ash/wm/coordinate_conversion.h" |
| 11 #include "ash/wm/shelf_layout_manager.h" | 13 #include "ash/wm/shelf_layout_manager.h" |
| 12 #include "base/logging.h" | 14 #include "base/logging.h" |
| 13 #include "ui/aura/client/screen_position_client.h" | 15 #include "ui/aura/client/screen_position_client.h" |
| 14 #include "ui/aura/env.h" | 16 #include "ui/aura/env.h" |
| 15 #include "ui/aura/display_manager.h" | 17 #include "ui/aura/display_manager.h" |
| 16 #include "ui/aura/root_window.h" | 18 #include "ui/aura/root_window.h" |
| 17 #include "ui/gfx/display.h" | 19 #include "ui/gfx/display.h" |
| 18 #include "ui/gfx/screen.h" | 20 #include "ui/gfx/screen.h" |
| 19 | 21 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 32 ScreenAsh::~ScreenAsh() { | 34 ScreenAsh::~ScreenAsh() { |
| 33 } | 35 } |
| 34 | 36 |
| 35 // static | 37 // static |
| 36 gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) { | 38 gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) { |
| 37 return GetDisplayManager()->FindDisplayContainingPoint(point); | 39 return GetDisplayManager()->FindDisplayContainingPoint(point); |
| 38 } | 40 } |
| 39 | 41 |
| 40 // static | 42 // static |
| 41 gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) { | 43 gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) { |
| 42 if (window->GetRootWindow() == Shell::GetPrimaryRootWindow()) | 44 if (GetRootWindowController(window->GetRootWindow())->launcher()) |
| 43 return GetDisplayWorkAreaBoundsInParent(window); | 45 return GetDisplayWorkAreaBoundsInParent(window); |
| 44 else | 46 else |
| 45 return GetDisplayBoundsInParent(window); | 47 return GetDisplayBoundsInParent(window); |
| 46 } | 48 } |
| 47 | 49 |
| 48 // static | 50 // static |
| 49 gfx::Rect ScreenAsh::GetDisplayBoundsInParent(aura::Window* window) { | 51 gfx::Rect ScreenAsh::GetDisplayBoundsInParent(aura::Window* window) { |
| 50 return ConvertRectFromScreen( | 52 return ConvertRectFromScreen( |
| 51 window->parent(), | 53 window->parent(), |
| 52 Shell::GetScreen()->GetDisplayNearestWindow(window).bounds()); | 54 Shell::GetScreen()->GetDisplayNearestWindow(window).bounds()); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 111 |
| 110 gfx::Display ScreenAsh::GetDisplayMatching(const gfx::Rect& match_rect) const { | 112 gfx::Display ScreenAsh::GetDisplayMatching(const gfx::Rect& match_rect) const { |
| 111 return GetDisplayManager()->GetDisplayMatching(match_rect); | 113 return GetDisplayManager()->GetDisplayMatching(match_rect); |
| 112 } | 114 } |
| 113 | 115 |
| 114 gfx::Display ScreenAsh::GetPrimaryDisplay() const { | 116 gfx::Display ScreenAsh::GetPrimaryDisplay() const { |
| 115 return DisplayController::GetPrimaryDisplay(); | 117 return DisplayController::GetPrimaryDisplay(); |
| 116 } | 118 } |
| 117 | 119 |
| 118 } // namespace ash | 120 } // namespace ash |
| OLD | NEW |