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

Unified Diff: chrome/browser/ui/cocoa/download/download_shelf_mac.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_mac.mm
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_mac.mm b/chrome/browser/ui/cocoa/download/download_shelf_mac.mm
index cf14be75ecc54bfa5be085e97b5d463db7ef8b0f..35ca1d36cb4ca5fe5b916b5e1b64df62ebe276b6 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_mac.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_mac.mm
@@ -28,18 +28,28 @@ bool DownloadShelfMac::IsClosing() const {
return false;
}
-void DownloadShelfMac::DoShow() {
- [shelf_controller_ showDownloadShelf:YES
- isUserAction:NO];
+void DownloadShelfMac::DoOpen() {
+ [shelf_controller_ showDownloadShelf:YES isUserAction:NO animate:YES];
browser_->UpdateDownloadShelfVisibility(true);
}
void DownloadShelfMac::DoClose(CloseReason reason) {
[shelf_controller_ showDownloadShelf:NO
- isUserAction:reason == USER_ACTION];
+ isUserAction:reason == USER_ACTION
+ animate:YES];
browser_->UpdateDownloadShelfVisibility(false);
}
+void DownloadShelfMac::DoHide() {
+ [shelf_controller_ showDownloadShelf:NO isUserAction:NO animate:NO];
+ browser_->UpdateDownloadShelfVisibility(false);
+}
+
+void DownloadShelfMac::DoUnhide() {
+ [shelf_controller_ showDownloadShelf:YES isUserAction:NO animate:NO];
+ browser_->UpdateDownloadShelfVisibility(true);
+}
+
Browser* DownloadShelfMac::browser() const {
return browser_;
}
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_shelf_mac.h ('k') | chrome/browser/ui/cocoa/download/download_shelf_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698