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

Unified Diff: ash/screen_util.cc

Issue 1684633002: ash/mash: Introduce a ShelfDelegate implementation for mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ash-sysui-window-container
Patch Set: self-nit Created 4 years, 10 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
« ash/mus/sysui/sysui_application.cc ('K') | « ash/mus/sysui/sysui_application.cc ('k') | no next file » | 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 c27d896e52cb2e107fb31b7c1515aba754dc14f5..d82298c7eac5c4baaf39fe7b5d6cf0fc98b11de2 100644
--- a/ash/screen_util.cc
+++ b/ash/screen_util.cc
@@ -65,6 +65,14 @@ gfx::Rect ScreenUtil::GetShelfDisplayBoundsInRoot(aura::Window* window) {
size.Scale(scale, scale);
return gfx::Rect(gfx::ToCeiledSize(size));
} else {
+ if (window->GetRootWindow()->bounds().IsEmpty()) {
+ // TODO(sad): This only happens when running with mustash, since the
+ // root-window here refers to the shelf Widget, which has not been
+ // sized/positioned yet. Use the bounds of the display in this case.
msw 2016/02/09 18:31:26 Could this always use the display bounds? When are
sadrul 2016/02/10 08:04:41 Looks like it could always use the display bounds
+ gfx::Display display =
sky 2016/02/09 20:44:08 We shouldn't be calling this code right? I think i
sadrul 2016/02/10 08:04:41 Added a NOTIMPLEMENTED() here. We do still need th
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(window);
+ return gfx::Rect(display.size());
+ }
return window->GetRootWindow()->bounds();
}
}
« ash/mus/sysui/sysui_application.cc ('K') | « ash/mus/sysui/sysui_application.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698