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

Unified Diff: ash/screen_util.cc

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 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 1ffa98cfce3d091ffb7bba0076a4e496f135fd65..8da7296950a25b25001f935154c414af0d5723ef 100644
--- a/ash/screen_util.cc
+++ b/ash/screen_util.cc
@@ -53,32 +53,6 @@ gfx::Rect ScreenUtil::GetDisplayWorkAreaBoundsInParent(aura::Window* window) {
}
// static
-gfx::Rect ScreenUtil::GetShelfDisplayBoundsInRoot(aura::Window* 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 display::Display& first =
- display_manager->software_mirroring_display_list()[0];
- float scale =
- static_cast<float>(window->GetRootWindow()->bounds().height()) /
- first.size().height();
- gfx::SizeF size(first.size());
- size.Scale(scale, scale);
- return gfx::Rect(gfx::ToCeiledSize(size));
- }
-
- if (Shell::GetInstance()->in_mus()) {
- // In mus the RootWindow is the widget's root window, so use the display
- // bounds.
- display::Display display =
- display::Screen::GetScreen()->GetDisplayNearestWindow(window);
- return display.bounds();
- }
-
- return window->GetRootWindow()->bounds();
-}
-
-// static
gfx::Rect ScreenUtil::ConvertRectToScreen(aura::Window* window,
const gfx::Rect& rect) {
gfx::Point point = rect.origin();
« 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