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
3 // found in the LICENSE file.
5 #ifndef ASH_SCREEN_UTIL_H_
6 #define ASH_SCREEN_UTIL_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
23 class ASH_EXPORT ScreenUtil
{
25 // Finds the display that contains |point| in screeen coordinates.
26 // Returns invalid display if there is no display that can satisfy
28 static gfx::Display
FindDisplayContainingPoint(const gfx::Point
& point
);
30 // Returns the bounds for maximized windows in parent coordinates.
31 // Maximized windows trigger auto-hiding the shelf.
32 static gfx::Rect
GetMaximizedWindowBoundsInParent(aura::Window
* window
);
34 // Returns the display bounds in parent coordinates.
35 static gfx::Rect
GetDisplayBoundsInParent(aura::Window
* window
);
37 // Returns the display's work area bounds in parent coordinates.
38 static gfx::Rect
GetDisplayWorkAreaBoundsInParent(aura::Window
* window
);
40 // TODO(oshima): Move following two to wm/coordinate_conversion.h
41 // Converts |rect| from |window|'s coordinates to the virtual screen
43 static gfx::Rect
ConvertRectToScreen(aura::Window
* window
,
44 const gfx::Rect
& rect
);
46 // Converts |rect| from virtual screen coordinates to the |window|'s
48 static gfx::Rect
ConvertRectFromScreen(aura::Window
* window
,
49 const gfx::Rect
& rect
);
51 // Returns a gfx::Display object for secondary display. Returns
52 // invalid display if there is no secondary display connected.
53 static const gfx::Display
& GetSecondaryDisplay();
55 // Returns a gfx::Display object for the specified id. Returns
56 // invalid display if no such display is connected.
57 static const gfx::Display
& GetDisplayForId(int64 display_id
);
63 DISALLOW_COPY_AND_ASSIGN(ScreenUtil
);
68 #endif // ASH_SCREEN_UTIL_H_