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

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 (IsDocked moved to namespac… 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
« no previous file with comments | « no previous file | ash/wm/panels/panel_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 // The window property will still be set, but no actual change will occur 570 // The window property will still be set, but no actual change will occur
571 // until OnFullscreenStateChange is called when exiting fullscreen. 571 // until OnFullscreenStateChange is called when exiting fullscreen.
572 if (in_fullscreen_) 572 if (in_fullscreen_)
573 return; 573 return;
574 if (window_state->IsMinimized()) { 574 if (window_state->IsMinimized()) {
575 MinimizeDockedWindow(window_state); 575 MinimizeDockedWindow(window_state);
576 } else if (window_state->IsMaximizedOrFullscreen()) { 576 } else if (window_state->IsMaximizedOrFullscreen()) {
577 // Reparenting changes the source bounds for the animation if a window is 577 // Reparenting changes the source bounds for the animation if a window is
578 // visible so hide it here and show later when it is already in the desktop. 578 // visible so hide it here and show later when it is already in the desktop.
579 UndockWindow(window); 579 UndockWindow(window);
580 } else { 580 } else if (old_type == wm::SHOW_TYPE_MINIMIZED) {
581 RestoreDockedWindow(window_state); 581 RestoreDockedWindow(window_state);
582 } 582 }
583 } 583 }
584 584
585 ///////////////////////////////////////////////////////////////////////////// 585 /////////////////////////////////////////////////////////////////////////////
586 // DockLayoutManager, WindowObserver implementation: 586 // DockLayoutManager, WindowObserver implementation:
587 587
588 void DockedWindowLayoutManager::OnWindowBoundsChanged( 588 void DockedWindowLayoutManager::OnWindowBoundsChanged(
589 aura::Window* window, 589 aura::Window* window,
590 const gfx::Rect& old_bounds, 590 const gfx::Rect& old_bounds,
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( 1014 void DockedWindowLayoutManager::OnKeyboardBoundsChanging(
1015 const gfx::Rect& keyboard_bounds) { 1015 const gfx::Rect& keyboard_bounds) {
1016 // This bounds change will have caused a change to the Shelf which does not 1016 // This bounds change will have caused a change to the Shelf which does not
1017 // propagate automatically to this class, so manually recalculate bounds. 1017 // propagate automatically to this class, so manually recalculate bounds.
1018 Relayout(); 1018 Relayout();
1019 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); 1019 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING);
1020 } 1020 }
1021 1021
1022 } // namespace internal 1022 } // namespace internal
1023 } // namespace ash 1023 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/panels/panel_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698