Commit 450f9c44 authored by Xiaoqian Dai's avatar Xiaoqian Dai Committed by Commit Bot

Remove slide down the minimize window when at home screen animation.

Bug: 1024031, 997885
Change-Id: Ic12b34115036de7a22fd29d8fe207f16bc07a15d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1912690Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714780}
parent dd6fa250
......@@ -17,9 +17,6 @@ enum WindowVisibilityAnimationType {
::wm::WINDOW_VISIBILITY_ANIMATION_MAX,
// Fade in/out using brightness and grayscale web filters.
WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE,
// Window slides down from above screen to show and, meanwhile, home launcher
// slides down off screen.
WINDOW_VISIBILITY_ANIMATION_TYPE_SLIDE_DOWN,
// Animate a window out of the closest side of the screen. Fade in if it
// re-appears.
WINDOW_VISIBILITY_ANIMATION_TYPE_FADE_IN_SLIDE_OUT,
......
......@@ -241,40 +241,6 @@ void AnimateHideWindow_BrightnessGrayscale(aura::Window* window) {
AnimateShowHideWindowCommon_BrightnessGrayscale(window, false);
}
bool AnimateShowWindow_SlideDown(aura::Window* window) {
HomeScreenController* home_screen_controller =
Shell::Get()->home_screen_controller();
const TabletModeController* tablet_mode_controller =
Shell::Get()->tablet_mode_controller();
if (home_screen_controller && tablet_mode_controller &&
tablet_mode_controller->InTabletMode()) {
// Slide down the window from above screen to show and, meanwhile, slide
// down the home launcher off screen.
HomeLauncherGestureHandler* handler =
home_screen_controller->home_launcher_gesture_handler();
if (handler &&
handler->HideHomeLauncherForWindow(
display::Screen::GetScreen()->GetDisplayNearestView(window),
window)) {
// Now that the window has been restored, we need to clear its animation
// style to default so that normal animation applies.
::wm::SetWindowVisibilityAnimationType(
window, ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT);
return true;
}
}
// Fallback to no animation.
return false;
}
bool AnimateHideWindow_SlideDown(aura::Window* window) {
// The hide animation should be handled in HomeLauncherGestureHandler, so
// fallback to no animation.
return false;
}
void AnimateHideWindow_SlideOut(aura::Window* window) {
base::TimeDelta duration =
base::TimeDelta::FromMilliseconds(PipPositioner::kPipDismissTimeMs);
......@@ -321,9 +287,6 @@ bool AnimateShowWindow(aura::Window* window) {
case WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE:
AnimateShowWindow_BrightnessGrayscale(window);
return true;
case WINDOW_VISIBILITY_ANIMATION_TYPE_SLIDE_DOWN:
return AnimateShowWindow_SlideDown(window);
return true;
case WINDOW_VISIBILITY_ANIMATION_TYPE_FADE_IN_SLIDE_OUT:
AnimateShowWindow_FadeIn(window);
return true;
......@@ -349,8 +312,6 @@ bool AnimateHideWindow(aura::Window* window) {
case WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE:
AnimateHideWindow_BrightnessGrayscale(window);
return true;
case WINDOW_VISIBILITY_ANIMATION_TYPE_SLIDE_DOWN:
return AnimateHideWindow_SlideDown(window);
case WINDOW_VISIBILITY_ANIMATION_TYPE_FADE_IN_SLIDE_OUT:
AnimateHideWindow_SlideOut(window);
return true;
......
......@@ -14,7 +14,6 @@
#include "ash/public/cpp/shelf_item.h"
#include "ash/public/cpp/shelf_model.h"
#include "ash/public/cpp/shelf_prefs.h"
#include "ash/public/cpp/tablet_mode.h"
#include "ash/public/cpp/window_animation_types.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
......@@ -602,12 +601,6 @@ ash::ShelfAction ChromeLauncherController::ActivateWindowOrMinimizeIfActive(
return ash::SHELF_ACTION_WINDOW_MINIMIZED;
}
if (ash::TabletMode::Get() && ash::TabletMode::Get()->InTabletMode()) {
// Run slide down animation to show the window.
wm::SetWindowVisibilityAnimationType(
native_window, ash::WINDOW_VISIBILITY_ANIMATION_TYPE_SLIDE_DOWN);
}
window->Show();
window->Activate();
return ash::SHELF_ACTION_WINDOW_ACTIVATED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment