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

Unified Diff: ash/screen_util.cc

Issue 1116313002: Layout login/lock screen, shelf and app list inside the first display in Unified Desktop mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/screen_util.h ('k') | ash/screen_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/screen_util.cc
diff --git a/ash/screen_util.cc b/ash/screen_util.cc
index 0e19b9dfc8e3c6790bed997063477d966a8a41e5..95b70ca124294a73d698025511a27a16c7f7d225 100644
--- a/ash/screen_util.cc
+++ b/ash/screen_util.cc
@@ -52,6 +52,20 @@ gfx::Rect ScreenUtil::GetDisplayWorkAreaBoundsInParent(aura::Window* window) {
Shell::GetScreen()->GetDisplayNearestWindow(window).work_area());
}
+gfx::Rect ScreenUtil::GetShelfDisplayBoundsInScreen(aura::Window* root_window) {
+ DisplayManager* display_manager = Shell::GetInstance()->display_manager();
+ if (display_manager->IsInUnifiedMode()) {
+ // In unified desktop mode, there is only one shelf in the 1st display.
+ const gfx::Display& first =
+ display_manager->software_mirroring_display_list()[0];
+ return first.bounds();
+ } else {
+ return gfx::Screen::GetScreenFor(root_window)
+ ->GetDisplayNearestWindow(root_window)
+ .bounds();
+ }
+}
+
// static
gfx::Rect ScreenUtil::ConvertRectToScreen(aura::Window* window,
const gfx::Rect& rect) {
@@ -79,9 +93,4 @@ const gfx::Display& ScreenUtil::GetSecondaryDisplay() {
display_manager->GetDisplayAt(1) : display_manager->GetDisplayAt(0);
}
-// static
-const gfx::Display& ScreenUtil::GetDisplayForId(int64 display_id) {
- return GetDisplayManager()->GetDisplayForId(display_id);
-}
-
} // namespace ash
« no previous file with comments | « ash/screen_util.h ('k') | ash/screen_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698