| 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
|
| index 92a268fb4cd8ef4ee6a6bc162109f267e5ca49fd..fdc7396daa48112453c96507a99eda717540881a 100644
|
| --- a/ash/common/wm/wm_screen_util.cc
|
| +++ b/ash/common/wm/wm_screen_util.cc
|
| @@ -5,8 +5,11 @@
|
| #include "ash/common/wm/wm_screen_util.h"
|
|
|
| #include "ash/common/wm_root_window_controller.h"
|
| +#include "ash/common/wm_shell.h"
|
| #include "ash/common/wm_window.h"
|
| #include "ui/display/display.h"
|
| +#include "ui/display/screen.h"
|
| +#include "ui/gfx/geometry/size_conversions.h"
|
|
|
| namespace ash {
|
| namespace wm {
|
| @@ -32,5 +35,17 @@ gfx::Rect GetMaximizedWindowBoundsInParent(WmWindow* 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
|
|
|