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

Side by Side Diff: ash/screen_util.h

Issue 2215223004: mash: Migrate ShelfLayoutManager ScreenUtil usage to ash common types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore screen bounds conversion for app list. Created 4 years, 4 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
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | ash/screen_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef ASH_SCREEN_UTIL_H_ 5 #ifndef ASH_SCREEN_UTIL_H_
6 #define ASH_SCREEN_UTIL_H_ 6 #define ASH_SCREEN_UTIL_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 10
(...skipping 22 matching lines...) Expand all
33 // Returns the bounds for maximized windows in parent coordinates. 33 // Returns the bounds for maximized windows in parent coordinates.
34 // Maximized windows trigger auto-hiding the shelf. 34 // Maximized windows trigger auto-hiding the shelf.
35 static gfx::Rect GetMaximizedWindowBoundsInParent(aura::Window* window); 35 static gfx::Rect GetMaximizedWindowBoundsInParent(aura::Window* window);
36 36
37 // Returns the display bounds in parent coordinates. 37 // Returns the display bounds in parent coordinates.
38 static gfx::Rect GetDisplayBoundsInParent(aura::Window* window); 38 static gfx::Rect GetDisplayBoundsInParent(aura::Window* window);
39 39
40 // Returns the display's work area bounds in parent coordinates. 40 // Returns the display's work area bounds in parent coordinates.
41 static gfx::Rect GetDisplayWorkAreaBoundsInParent(aura::Window* window); 41 static gfx::Rect GetDisplayWorkAreaBoundsInParent(aura::Window* window);
42 42
43 // Returns the physical display bounds containing the shelf that
44 // shares the same root window as |root|. Physical displays can
45 // differ from logical displays in unified desktop mode.
46 // TODO(oshima): If we need to expand the unified desktop support to
47 // general use, we should consider always using physical display in
48 // window layout instead of root window, and keep the logical
49 // display only in display management code.
50 static gfx::Rect GetShelfDisplayBoundsInRoot(aura::Window* window);
51
52 // TODO(oshima): Move following two to wm/coordinate_conversion.h 43 // TODO(oshima): Move following two to wm/coordinate_conversion.h
53 // Converts |rect| from |window|'s coordinates to the virtual screen 44 // Converts |rect| from |window|'s coordinates to the virtual screen
54 // coordinates. 45 // coordinates.
55 static gfx::Rect ConvertRectToScreen(aura::Window* window, 46 static gfx::Rect ConvertRectToScreen(aura::Window* window,
56 const gfx::Rect& rect); 47 const gfx::Rect& rect);
57 48
58 // Converts |rect| from virtual screen coordinates to the |window|'s 49 // Converts |rect| from virtual screen coordinates to the |window|'s
59 // coordinates. 50 // coordinates.
60 static gfx::Rect ConvertRectFromScreen(aura::Window* window, 51 static gfx::Rect ConvertRectFromScreen(aura::Window* window,
61 const gfx::Rect& rect); 52 const gfx::Rect& rect);
62 53
63 // Returns a display::Display object for secondary display. Returns 54 // Returns a display::Display object for secondary display. Returns
64 // invalid display if there is no secondary display connected. 55 // invalid display if there is no secondary display connected.
65 static const display::Display& GetSecondaryDisplay(); 56 static const display::Display& GetSecondaryDisplay();
66 57
67 private: 58 private:
68 ScreenUtil() {} 59 ScreenUtil() {}
69 ~ScreenUtil() {} 60 ~ScreenUtil() {}
70 61
71 DISALLOW_COPY_AND_ASSIGN(ScreenUtil); 62 DISALLOW_COPY_AND_ASSIGN(ScreenUtil);
72 }; 63 };
73 64
74 } // namespace ash 65 } // namespace ash
75 66
76 #endif // ASH_SCREEN_UTIL_H_ 67 #endif // ASH_SCREEN_UTIL_H_
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | ash/screen_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698