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

Unified Diff: ash/screen_util.cc

Issue 2876993002: Introduce window container to be used by lock screen app windows (Closed)
Patch Set: . Created 3 years, 7 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
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.

Powered by Google App Engine
This is Rietveld 408576698