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

Unified Diff: mash/wm/window_layout.cc

Issue 1954933002: Initial cut of ash/wm/common classes for mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 4 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
« no previous file with comments | « mash/wm/root_window_controller.cc ('k') | ui/views/mus/platform_window_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/window_layout.cc
diff --git a/mash/wm/window_layout.cc b/mash/wm/window_layout.cc
index 3cd6807f413896366e813efc5e8e7ebfef13a7b5..bd374a1172e07f68d14eaeb536f291e68916b8f6 100644
--- a/mash/wm/window_layout.cc
+++ b/mash/wm/window_layout.cc
@@ -25,8 +25,8 @@ void WindowLayout::LayoutWindow(mus::Window* window) {
gfx::Rect user_set_bounds = GetWindowUserSetBounds(window);
gfx::Size preferred_size = GetWindowPreferredSize(window);
- // Maximized/fullscreen/presentation windows should be sized to the bounds
- // of the container.
+ // Maximized/fullscreen windows should be sized to the bounds of the
+ // container.
// If a window has bounds set by the user, those should be respected as long
// as they meet certain constraints (e.g. visible).
// TODO(beng): transient windows:
@@ -35,12 +35,15 @@ void WindowLayout::LayoutWindow(mus::Window* window) {
// Transient windows should be opened centered within their parent.
switch (show_state) {
+ case mus::mojom::ShowState::FULLSCREEN:
case mus::mojom::ShowState::MAXIMIZED:
- case mus::mojom::ShowState::IMMERSIVE:
- case mus::mojom::ShowState::PRESENTATION:
FitToContainer(window);
break;
- case mus::mojom::ShowState::RESTORED: {
+
+ case mus::mojom::ShowState::DEFAULT:
+ case mus::mojom::ShowState::DOCKED:
+ case mus::mojom::ShowState::INACTIVE:
+ case mus::mojom::ShowState::NORMAL: {
if (!user_set_bounds.IsEmpty()) {
// If the bounds are unchanged, this will do nothing.
window->SetBounds(user_set_bounds);
« no previous file with comments | « mash/wm/root_window_controller.cc ('k') | ui/views/mus/platform_window_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698