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

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

Issue 68033003: Undocks window first before side-snapping bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/window_state.h » ('j') | ash/wm/window_state.cc » ('J')
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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 wm::WindowShowType old_type) { 558 wm::WindowShowType old_type) {
559 aura::Window* window = window_state->window(); 559 aura::Window* window = window_state->window();
560 if (IsPopupOrTransient(window)) 560 if (IsPopupOrTransient(window))
561 return; 561 return;
562 // The window property will still be set, but no actual change will occur 562 // The window property will still be set, but no actual change will occur
563 // until OnFullscreenStateChange is called when exiting fullscreen. 563 // until OnFullscreenStateChange is called when exiting fullscreen.
564 if (in_fullscreen_) 564 if (in_fullscreen_)
565 return; 565 return;
566 if (window_state->IsMinimized()) { 566 if (window_state->IsMinimized()) {
567 MinimizeDockedWindow(window_state); 567 MinimizeDockedWindow(window_state);
568 } else if (window_state->IsMaximizedOrFullscreen()) { 568 } else if (window_state->IsMaximizedOrFullscreen() ||
pkotwicz 2013/11/18 16:25:20 How about: } else if (window_state->IsNormalShowSt
oshima 2013/11/18 18:44:44 sgtm
varkha 2013/11/20 00:11:13 SHOW_TYPE_*_SNAPPED types are both present with Is
569 window_state->window_show_type() == wm::SHOW_TYPE_LEFT_SNAPPED ||
570 window_state->window_show_type() == wm::SHOW_TYPE_RIGHT_SNAPPED) {
569 // Reparenting changes the source bounds for the animation if a window is 571 // Reparenting changes the source bounds for the animation if a window is
pkotwicz 2013/11/18 16:25:20 This comment is no longer relevant?
varkha 2013/11/20 00:11:13 Done.
570 // visible so hide it here and show later when it is already in the desktop. 572 // visible so hide it here and show later when it is already in the desktop.
571 UndockWindow(window); 573 UndockWindow(window);
572 RecordUmaAction(DOCKED_ACTION_MAXIMIZE, DOCKED_ACTION_SOURCE_UNKNOWN); 574 RecordUmaAction(DOCKED_ACTION_MAXIMIZE, DOCKED_ACTION_SOURCE_UNKNOWN);
573 } else if (old_type == wm::SHOW_TYPE_MINIMIZED) { 575 } else if (old_type == wm::SHOW_TYPE_MINIMIZED) {
574 RestoreDockedWindow(window_state); 576 RestoreDockedWindow(window_state);
575 } 577 }
576 } 578 }
577 579
578 ///////////////////////////////////////////////////////////////////////////// 580 /////////////////////////////////////////////////////////////////////////////
579 // DockLayoutManager, WindowObserver implementation: 581 // DockLayoutManager, WindowObserver implementation:
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( 1064 void DockedWindowLayoutManager::OnKeyboardBoundsChanging(
1063 const gfx::Rect& keyboard_bounds) { 1065 const gfx::Rect& keyboard_bounds) {
1064 // This bounds change will have caused a change to the Shelf which does not 1066 // This bounds change will have caused a change to the Shelf which does not
1065 // propagate automatically to this class, so manually recalculate bounds. 1067 // propagate automatically to this class, so manually recalculate bounds.
1066 Relayout(); 1068 Relayout();
1067 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); 1069 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING);
1068 } 1070 }
1069 1071
1070 } // namespace internal 1072 } // namespace internal
1071 } // namespace ash 1073 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/window_state.h » ('j') | ash/wm/window_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698