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

Side by Side Diff: trunk/src/ui/message_center/cocoa/tray_view_controller.mm

Issue 269893004: Revert 268203 "There are many ways to get it wrong." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
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 #import "ui/message_center/cocoa/tray_view_controller.h" 5 #import "ui/message_center/cocoa/tray_view_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/mac/scoped_nsautorelease_pool.h" 9 #include "base/mac/scoped_nsautorelease_pool.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Update both tray view and window by resizing it to fit its content. 49 // Update both tray view and window by resizing it to fit its content.
50 - (void)updateTrayViewAndWindow; 50 - (void)updateTrayViewAndWindow;
51 51
52 // Remove notifications dismissed by the user. It is done in the following 52 // Remove notifications dismissed by the user. It is done in the following
53 // 3 steps. 53 // 3 steps.
54 - (void)closeNotificationsByUser; 54 - (void)closeNotificationsByUser;
55 55
56 // Step 1: hide all notifications pending removal with fade-out animation. 56 // Step 1: hide all notifications pending removal with fade-out animation.
57 - (void)hideNotificationsPendingRemoval; 57 - (void)hideNotificationsPendingRemoval;
58 58
59 // Step 2: move up all remaining notifications to take over the available space 59 // Step 2: move up all remaining notfications to take over the available space
60 // due to hiding notifications. The scroll view and the window remain unchanged. 60 // due to hiding notifications. The scroll view and the window remain unchanged.
61 - (void)moveUpRemainingNotifications; 61 - (void)moveUpRemainingNotifications;
62 62
63 // Step 3: finalize the tray view and window to get rid of the empty space. 63 // Step 3: finalize the tray view and window to get rid of the empty space.
64 - (void)finalizeTrayViewAndWindow; 64 - (void)finalizeTrayViewAndWindow;
65 65
66 // Clear a notification by sliding it out from left to right. This occurs when 66 // Clear a notification by sliding it out from left to right. This occurs when
67 // "Clear All" is clicked. 67 // "Clear All" is clicked.
68 - (void)clearOneNotification; 68 - (void)clearOneNotification;
69 69
70 // When all visible notifications slide out, re-enable controls and remove 70 // When all visible notificatons slide out, re-enable controls and remove
71 // notifications from the message center. 71 // notifications from the message center.
72 - (void)finalizeClearAll; 72 - (void)finalizeClearAll;
73 73
74 // Sets the images of the quiet mode button based on the message center state. 74 // Sets the images of the quiet mode button based on the message center state.
75 - (void)updateQuietModeButtonImage; 75 - (void)updateQuietModeButtonImage;
76 @end 76 @end
77 77
78 namespace { 78 namespace {
79 79
80 // The duration of fade-out and bounds animation. 80 // The duration of fade-out and bounds animation.
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 [pauseButton_ setDefaultImage: rb.GetNativeImageNamed( 799 [pauseButton_ setDefaultImage: rb.GetNativeImageNamed(
800 IDR_NOTIFICATION_DO_NOT_DISTURB_PRESSED).ToNSImage()]; 800 IDR_NOTIFICATION_DO_NOT_DISTURB_PRESSED).ToNSImage()];
801 } else { 801 } else {
802 [pauseButton_ setTrackingEnabled:YES]; 802 [pauseButton_ setTrackingEnabled:YES];
803 [pauseButton_ setDefaultImage: 803 [pauseButton_ setDefaultImage:
804 rb.GetNativeImageNamed(IDR_NOTIFICATION_DO_NOT_DISTURB).ToNSImage()]; 804 rb.GetNativeImageNamed(IDR_NOTIFICATION_DO_NOT_DISTURB).ToNSImage()];
805 } 805 }
806 } 806 }
807 807
808 @end 808 @end
OLDNEW
« no previous file with comments | « trunk/src/ui/file_manager/file_manager/background/js/device_handler.js ('k') | trunk/src/ui/message_center/message_center.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698