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

Unified Diff: ash/common/wm/wm_screen_util.cc

Issue 2736573002: chromeos: Move files in //ash/common to //ash, part 2 (Closed)
Patch Set: Created 3 years, 9 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/common/wm/wm_screen_util.h ('k') | ash/common/wm/wm_snap_to_pixel_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/wm_screen_util.cc
diff --git a/ash/common/wm/wm_screen_util.cc b/ash/common/wm/wm_screen_util.cc
deleted file mode 100644
index 768556a6cc08aeb5ed24565b53233c4b7e3e2891..0000000000000000000000000000000000000000
--- a/ash/common/wm/wm_screen_util.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/common/wm/wm_screen_util.h"
-
-#include "ash/common/wm_shell.h"
-#include "ash/common/wm_window.h"
-#include "ash/root_window_controller.h"
-#include "ui/display/display.h"
-#include "ui/display/screen.h"
-#include "ui/gfx/geometry/size_conversions.h"
-
-namespace ash {
-namespace wm {
-
-gfx::Rect GetDisplayWorkAreaBoundsInParent(WmWindow* window) {
- display::Display display = window->GetDisplayNearestWindow();
- return window->GetParent()->ConvertRectFromScreen(display.work_area());
-}
-
-gfx::Rect GetDisplayBoundsInParent(WmWindow* window) {
- display::Display display = window->GetDisplayNearestWindow();
- return window->GetParent()->ConvertRectFromScreen(display.bounds());
-}
-
-gfx::Rect GetMaximizedWindowBoundsInParent(WmWindow* window) {
- if (window->GetRootWindowController()->HasShelf())
- return GetDisplayWorkAreaBoundsInParent(window);
-
- return GetDisplayBoundsInParent(window);
-}
-
-gfx::Rect GetDisplayBoundsWithShelf(WmWindow* window) {
- if (WmShell::Get()->IsInUnifiedMode()) {
- // In unified desktop mode, there is only one shelf in the first display.
- gfx::SizeF size(WmShell::Get()->GetFirstDisplay().size());
- float scale = window->GetRootWindow()->GetBounds().height() / size.height();
- size.Scale(scale, scale);
- return gfx::Rect(gfx::ToCeiledSize(size));
- }
-
- return window->GetRootWindow()->GetBounds();
-}
-
-} // namespace wm
-} // namespace ash
« no previous file with comments | « ash/common/wm/wm_screen_util.h ('k') | ash/common/wm/wm_snap_to_pixel_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698