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

Side by Side Diff: ash/wm/dock/docked_window_layout_manager.cc

Issue 38073004: Not moving a docked window when restoring a previously maximized window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Not moving a docked window when restoring a previously maximized window (nits) Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/dock/docked_window_layout_manager.h" 5 #include "ash/wm/dock/docked_window_layout_manager.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/launcher/launcher.h" 8 #include "ash/launcher/launcher.h"
9 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 // The window property will still be set, but no actual change will occur 569 // The window property will still be set, but no actual change will occur
570 // until OnFullscreenStateChange is called when exiting fullscreen. 570 // until OnFullscreenStateChange is called when exiting fullscreen.
571 if (in_fullscreen_) 571 if (in_fullscreen_)
572 return; 572 return;
573 if (window_state->IsMinimized()) { 573 if (window_state->IsMinimized()) {
574 MinimizeDockedWindow(window_state); 574 MinimizeDockedWindow(window_state);
575 } else if (window_state->IsMaximizedOrFullscreen()) { 575 } else if (window_state->IsMaximizedOrFullscreen()) {
576 // Reparenting changes the source bounds for the animation if a window is 576 // Reparenting changes the source bounds for the animation if a window is
577 // visible so hide it here and show later when it is already in the desktop. 577 // visible so hide it here and show later when it is already in the desktop.
578 UndockWindow(window); 578 UndockWindow(window);
579 } else { 579 } else if (old_type == wm::SHOW_TYPE_MINIMIZED) {
580 RestoreDockedWindow(window_state); 580 RestoreDockedWindow(window_state);
581 } 581 }
582 } 582 }
583 583
584 ///////////////////////////////////////////////////////////////////////////// 584 /////////////////////////////////////////////////////////////////////////////
585 // DockLayoutManager, WindowObserver implementation: 585 // DockLayoutManager, WindowObserver implementation:
586 586
587 void DockedWindowLayoutManager::OnWindowBoundsChanged( 587 void DockedWindowLayoutManager::OnWindowBoundsChanged(
588 aura::Window* window, 588 aura::Window* window,
589 const gfx::Rect& old_bounds, 589 const gfx::Rect& old_bounds,
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( 1013 void DockedWindowLayoutManager::OnKeyboardBoundsChanging(
1014 const gfx::Rect& keyboard_bounds) { 1014 const gfx::Rect& keyboard_bounds) {
1015 // This bounds change will have caused a change to the Shelf which does not 1015 // This bounds change will have caused a change to the Shelf which does not
1016 // propagate automatically to this class, so manually recalculate bounds. 1016 // propagate automatically to this class, so manually recalculate bounds.
1017 Relayout(); 1017 Relayout();
1018 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); 1018 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING);
1019 } 1019 }
1020 1020
1021 } // namespace internal 1021 } // namespace internal
1022 } // namespace ash 1022 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698