Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: ash/screen_ash.cc

Issue 24020002: Move GetRootWindowController() to root_window_controller.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "ash/shelf/shelf_widget.h" 11 #include "ash/shelf/shelf_widget.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ash/wm/property_util.h"
14 #include "ash/wm/coordinate_conversion.h" 13 #include "ash/wm/coordinate_conversion.h"
15 #include "base/logging.h" 14 #include "base/logging.h"
16 #include "ui/aura/client/screen_position_client.h" 15 #include "ui/aura/client/screen_position_client.h"
17 #include "ui/aura/env.h" 16 #include "ui/aura/env.h"
18 #include "ui/aura/root_window.h" 17 #include "ui/aura/root_window.h"
19 #include "ui/gfx/display.h" 18 #include "ui/gfx/display.h"
20 #include "ui/gfx/screen.h" 19 #include "ui/gfx/screen.h"
21 20
22 namespace ash { 21 namespace ash {
23 22
(...skipping 13 matching lines...) Expand all
37 ScreenAsh::~ScreenAsh() { 36 ScreenAsh::~ScreenAsh() {
38 } 37 }
39 38
40 // static 39 // static
41 gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) { 40 gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) {
42 return GetDisplayManager()->FindDisplayContainingPoint(point); 41 return GetDisplayManager()->FindDisplayContainingPoint(point);
43 } 42 }
44 43
45 // static 44 // static
46 gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) { 45 gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) {
47 if (GetRootWindowController(window->GetRootWindow())->shelf()) 46 if (internal::GetRootWindowController(window->GetRootWindow())->shelf())
48 return GetDisplayWorkAreaBoundsInParent(window); 47 return GetDisplayWorkAreaBoundsInParent(window);
49 else 48 else
50 return GetDisplayBoundsInParent(window); 49 return GetDisplayBoundsInParent(window);
51 } 50 }
52 51
53 // static 52 // static
54 gfx::Rect ScreenAsh::GetDisplayBoundsInParent(aura::Window* window) { 53 gfx::Rect ScreenAsh::GetDisplayBoundsInParent(aura::Window* window) {
55 return ConvertRectFromScreen( 54 return ConvertRectFromScreen(
56 window->parent(), 55 window->parent(),
57 Shell::GetScreen()->GetDisplayNearestWindow(window).bounds()); 56 Shell::GetScreen()->GetDisplayNearestWindow(window).bounds());
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 151
153 void ScreenAsh::AddObserver(gfx::DisplayObserver* observer) { 152 void ScreenAsh::AddObserver(gfx::DisplayObserver* observer) {
154 observers_.AddObserver(observer); 153 observers_.AddObserver(observer);
155 } 154 }
156 155
157 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) { 156 void ScreenAsh::RemoveObserver(gfx::DisplayObserver* observer) {
158 observers_.RemoveObserver(observer); 157 observers_.RemoveObserver(observer);
159 } 158 }
160 159
161 } // namespace ash 160 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698