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/display_manager.h" | 8 #include "ash/display/display_manager.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 ScreenAsh::~ScreenAsh() { | 33 ScreenAsh::~ScreenAsh() { |
34 } | 34 } |
35 | 35 |
36 // static | 36 // static |
37 gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) { | 37 gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) { |
38 return GetDisplayManager()->FindDisplayContainingPoint(point); | 38 return GetDisplayManager()->FindDisplayContainingPoint(point); |
39 } | 39 } |
40 | 40 |
41 // static | 41 // static |
42 gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) { | 42 gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) { |
43 if (GetRootWindowController(window->GetRootWindow())->shelf()->launcher()) | 43 if (GetRootWindowController(window->GetRootWindow())->shelf()) |
44 return GetDisplayWorkAreaBoundsInParent(window); | 44 return GetDisplayWorkAreaBoundsInParent(window); |
45 else | 45 else |
46 return GetDisplayBoundsInParent(window); | 46 return GetDisplayBoundsInParent(window); |
47 } | 47 } |
48 | 48 |
49 // static | 49 // static |
50 gfx::Rect ScreenAsh::GetDisplayBoundsInParent(aura::Window* window) { | 50 gfx::Rect ScreenAsh::GetDisplayBoundsInParent(aura::Window* window) { |
51 return ConvertRectFromScreen( | 51 return ConvertRectFromScreen( |
52 window->parent(), | 52 window->parent(), |
53 Shell::GetScreen()->GetDisplayNearestWindow(window).bounds()); | 53 Shell::GetScreen()->GetDisplayNearestWindow(window).bounds()); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 void ScreenAsh::AddObserver(gfx::DisplayObserver* observer) { | 138 void ScreenAsh::AddObserver(gfx::DisplayObserver* observer) { |
139 observers_.AddObserver(observer); | 139 observers_.AddObserver(observer); |
140 } | 140 } |
141 | 141 |
142 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { | 142 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { |
143 observers_.RemoveObserver(observer); | 143 observers_.RemoveObserver(observer); |
144 } | 144 } |
145 | 145 |
146 } // namespace ash | 146 } // namespace ash |
OLD | NEW |