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

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

Issue 68513003: Does not override default animation when closing a docked window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Does not override default animation when closing a docked window (nit) 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 | no next file » | 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 const gfx::Rect& new_bounds) { 594 const gfx::Rect& new_bounds) {
595 // Only relayout if the dragged window would get docked. 595 // Only relayout if the dragged window would get docked.
596 if (window == dragged_window_ && is_dragged_window_docked_) 596 if (window == dragged_window_ && is_dragged_window_docked_)
597 Relayout(); 597 Relayout();
598 } 598 }
599 599
600 void DockedWindowLayoutManager::OnWindowVisibilityChanging( 600 void DockedWindowLayoutManager::OnWindowVisibilityChanging(
601 aura::Window* window, bool visible) { 601 aura::Window* window, bool visible) {
602 if (IsPopupOrTransient(window)) 602 if (IsPopupOrTransient(window))
603 return; 603 return;
604 int animation_type = WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE; 604 int animation_type = views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT;
605 if (visible) { 605 if (visible) {
606 animation_type = views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT; 606 animation_type = views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_DROP;
607 views::corewm::SetWindowVisibilityAnimationDuration( 607 views::corewm::SetWindowVisibilityAnimationDuration(
608 window, base::TimeDelta::FromMilliseconds(kFadeDurationMs)); 608 window, base::TimeDelta::FromMilliseconds(kFadeDurationMs));
609 } else if (wm::GetWindowState(window)->IsMinimized()) {
610 animation_type = WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE;
609 } 611 }
610 views::corewm::SetWindowVisibilityAnimationType(window, animation_type); 612 views::corewm::SetWindowVisibilityAnimationType(window, animation_type);
611 } 613 }
612 614
613 void DockedWindowLayoutManager::OnWindowDestroying(aura::Window* window) { 615 void DockedWindowLayoutManager::OnWindowDestroying(aura::Window* window) {
614 if (dragged_window_ == window) { 616 if (dragged_window_ == window) {
615 FinishDragging(DOCKED_ACTION_NONE, DOCKED_ACTION_SOURCE_UNKNOWN); 617 FinishDragging(DOCKED_ACTION_NONE, DOCKED_ACTION_SOURCE_UNKNOWN);
616 DCHECK(!dragged_window_); 618 DCHECK(!dragged_window_);
617 DCHECK (!is_dragged_window_docked_); 619 DCHECK (!is_dragged_window_docked_);
618 } 620 }
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( 1072 void DockedWindowLayoutManager::OnKeyboardBoundsChanging(
1071 const gfx::Rect& keyboard_bounds) { 1073 const gfx::Rect& keyboard_bounds) {
1072 // This bounds change will have caused a change to the Shelf which does not 1074 // This bounds change will have caused a change to the Shelf which does not
1073 // propagate automatically to this class, so manually recalculate bounds. 1075 // propagate automatically to this class, so manually recalculate bounds.
1074 Relayout(); 1076 Relayout();
1075 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); 1077 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING);
1076 } 1078 }
1077 1079
1078 } // namespace internal 1080 } // namespace internal
1079 } // namespace ash 1081 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698