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

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: 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 && wm::GetWindowState(window)->IsMinimized())
606 animation_type = WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE;
605 if (visible) { 607 if (visible) {
606 animation_type = views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT;
607 views::corewm::SetWindowVisibilityAnimationDuration( 608 views::corewm::SetWindowVisibilityAnimationDuration(
608 window, base::TimeDelta::FromMilliseconds(kFadeDurationMs)); 609 window, base::TimeDelta::FromMilliseconds(kFadeDurationMs));
pkotwicz 2013/11/11 18:10:51 You should be explicit about the animation type yo
varkha 2013/11/11 20:18:30 Done (I think). This is matching the type set in G
609 } 610 }
610 views::corewm::SetWindowVisibilityAnimationType(window, animation_type); 611 views::corewm::SetWindowVisibilityAnimationType(window, animation_type);
611 } 612 }
612 613
613 void DockedWindowLayoutManager::OnWindowDestroying(aura::Window* window) { 614 void DockedWindowLayoutManager::OnWindowDestroying(aura::Window* window) {
614 if (dragged_window_ == window) { 615 if (dragged_window_ == window) {
615 FinishDragging(DOCKED_ACTION_NONE, DOCKED_ACTION_SOURCE_UNKNOWN); 616 FinishDragging(DOCKED_ACTION_NONE, DOCKED_ACTION_SOURCE_UNKNOWN);
616 DCHECK(!dragged_window_); 617 DCHECK(!dragged_window_);
617 DCHECK (!is_dragged_window_docked_); 618 DCHECK (!is_dragged_window_docked_);
618 } 619 }
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( 1071 void DockedWindowLayoutManager::OnKeyboardBoundsChanging(
1071 const gfx::Rect& keyboard_bounds) { 1072 const gfx::Rect& keyboard_bounds) {
1072 // This bounds change will have caused a change to the Shelf which does not 1073 // This bounds change will have caused a change to the Shelf which does not
1073 // propagate automatically to this class, so manually recalculate bounds. 1074 // propagate automatically to this class, so manually recalculate bounds.
1074 Relayout(); 1075 Relayout();
1075 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); 1076 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING);
1076 } 1077 }
1077 1078
1078 } // namespace internal 1079 } // namespace internal
1079 } // namespace ash 1080 } // 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