Index: ash/screen_util.cc |
diff --git a/ash/screen_util.cc b/ash/screen_util.cc |
index af12586f0cde5ab920239c1b53a005d08064c3cd..64b807876b1ba09dfc0650d862e85ab95c9b309a 100644 |
--- a/ash/screen_util.cc |
+++ b/ash/screen_util.cc |
@@ -8,6 +8,7 @@ |
#include "ash/shelf/wm_shelf.h" |
#include "ash/shell.h" |
#include "ash/shell_port.h" |
+#include "ash/wm_window.h" |
#include "base/logging.h" |
#include "ui/aura/client/screen_position_client.h" |
#include "ui/aura/window_event_dispatcher.h" |
@@ -44,6 +45,17 @@ gfx::Rect ScreenUtil::GetDisplayWorkAreaBoundsInParent(aura::Window* window) { |
} |
// static |
+gfx::Rect ScreenUtil::GetDisplayWorkAreaBoundsInParentForLockScreen( |
+ aura::Window* window) { |
+ WmShelf* shelf = WmShelf::ForWindow(WmWindow::Get(window)); |
+ if (!shelf) |
+ return GetDisplayBoundsInParent(window); |
+ gfx::Rect bounds = shelf->GetUserWorkAreaBounds(); |
+ ::wm::ConvertRectFromScreen(window->parent(), &bounds); |
+ return bounds; |
+} |
+ |
+// static |
gfx::Rect ScreenUtil::GetDisplayBoundsWithShelf(aura::Window* window) { |
if (ShellPort::Get()->IsInUnifiedMode()) { |
// In unified desktop mode, there is only one shelf in the first display. |