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

Unified Diff: ash/wm/lock_window_state.cc

Issue 1116313002: Layout login/lock screen, shelf and app list inside the first display in Unified Desktop mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/wm/app_list_controller.cc ('k') | chrome/browser/ui/webui/options/chromeos/display_overscan_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/lock_window_state.cc
diff --git a/ash/wm/lock_window_state.cc b/ash/wm/lock_window_state.cc
index 06fb8b3f143ecdf5a198e0a1b8a879b82bef4ceb..d153fb258c8803fd8be6039fe468ceb483e77206 100644
--- a/ash/wm/lock_window_state.cc
+++ b/ash/wm/lock_window_state.cc
@@ -4,6 +4,7 @@
#include "ash/wm/lock_window_state.h"
+#include "ash/display/display_manager.h"
#include "ash/screen_util.h"
#include "ash/shell.h"
#include "ash/wm/lock_layout_manager.h"
@@ -164,6 +165,17 @@ wm::WindowStateType LockWindowState::GetMaximizedOrCenteredWindowType(
wm::WINDOW_STATE_TYPE_NORMAL;
}
+gfx::Rect GetBoundsForLockWindow(aura::Window* window) {
+ DisplayManager* display_manager = Shell::GetInstance()->display_manager();
+ if (display_manager->IsInUnifiedMode()) {
+ const gfx::Display& first =
+ display_manager->software_mirroring_display_list()[0];
+ return first.bounds();
+ } else {
+ return ScreenUtil::GetDisplayBoundsInParent(window);
+ }
+}
+
void LockWindowState::UpdateBounds(wm::WindowState* window_state) {
if (!window_state->IsMaximized() && !window_state->IsFullscreen())
return;
@@ -177,9 +189,9 @@ void LockWindowState::UpdateBounds(wm::WindowState* window_state) {
keyboard_controller->keyboard_visible()) {
keyboard_bounds = keyboard_controller->current_keyboard_bounds();
}
-
gfx::Rect bounds =
- ScreenUtil::GetDisplayBoundsInParent(window_state->window());
+ ScreenUtil::GetShelfDisplayBoundsInScreen(window_state->window());
+
bounds.set_height(bounds.height() - keyboard_bounds.height());
VLOG(1) << "Updating window bounds to: " << bounds.ToString();
« no previous file with comments | « ash/wm/app_list_controller.cc ('k') | chrome/browser/ui/webui/options/chromeos/display_overscan_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698