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

Unified Diff: chrome/browser/ui/cocoa/download/download_shelf_controller.mm

Issue 2688413012: Don't animate the download shelf when entering/exiting fullscreen. (Closed)
Patch Set: Turn on animation for all tests except the one that was flaky due to animation. Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/download/download_shelf_controller.mm
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
index cc0cc76fd28091fcce7f9f5dbb5f085c77741c3f..364bf2a76af43654e79df54fc20dbc0741621d28 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
@@ -227,7 +227,8 @@ const NSSize kHoverCloseButtonDefaultSize = { 18, 18 };
}
- (void)showDownloadShelf:(BOOL)show
- isUserAction:(BOOL)isUserAction {
+ isUserAction:(BOOL)isUserAction
+ animate:(BOOL)animate {
[self cancelAutoClose];
shouldCloseOnMouseExit_ = NO;
@@ -251,11 +252,11 @@ const NSSize kHoverCloseButtonDefaultSize = { 18, 18 };
// do no animation over janky animation. Find a way to make animating in
// smoother.
AnimatableView* view = [self animatableView];
- if (show) {
- [view setHeight:maxShelfHeight_];
- [view setHidden:NO];
- } else {
+ if (animate && !show) {
[view animateToNewHeight:0 duration:kDownloadShelfCloseDuration];
+ } else {
+ [view setHeight:show ? maxShelfHeight_ : 0];
+ [view setHidden:!show];
}
barIsVisible_ = show;

Powered by Google App Engine
This is Rietveld 408576698