OLD | NEW |
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 #ifndef UI_MESSAGE_CENTER_COCOA_POPUP_COLLECTION_H_ | 5 #ifndef UI_MESSAGE_CENTER_COCOA_POPUP_COLLECTION_H_ |
6 #define UI_MESSAGE_CENTER_COCOA_POPUP_COLLECTION_H_ | 6 #define UI_MESSAGE_CENTER_COCOA_POPUP_COLLECTION_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 16 matching lines...) Expand all Loading... |
27 // arrange notifications on the screen as popups, starting in the upper-right | 27 // arrange notifications on the screen as popups, starting in the upper-right |
28 // corner, going to the bottom of the screen. This class maintains ownership of | 28 // corner, going to the bottom of the screen. This class maintains ownership of |
29 // the Cocoa controllers and windows of the notifications. | 29 // the Cocoa controllers and windows of the notifications. |
30 MESSAGE_CENTER_EXPORT | 30 MESSAGE_CENTER_EXPORT |
31 @interface MCPopupCollection : NSObject { | 31 @interface MCPopupCollection : NSObject { |
32 @private | 32 @private |
33 // The message center that is responsible for the notifications. Weak, global. | 33 // The message center that is responsible for the notifications. Weak, global. |
34 message_center::MessageCenter* messageCenter_; | 34 message_center::MessageCenter* messageCenter_; |
35 | 35 |
36 // MessageCenterObserver implementation. | 36 // MessageCenterObserver implementation. |
37 scoped_ptr<message_center::MessageCenterObserver> observer_; | 37 std::unique_ptr<message_center::MessageCenterObserver> observer_; |
38 | 38 |
39 // Array of all on-screen popup notifications. | 39 // Array of all on-screen popup notifications. |
40 base::scoped_nsobject<NSMutableArray> popups_; | 40 base::scoped_nsobject<NSMutableArray> popups_; |
41 | 41 |
42 // Array of all on-screen popup notifications that are being faded out | 42 // Array of all on-screen popup notifications that are being faded out |
43 // for removal. | 43 // for removal. |
44 base::scoped_nsobject<NSMutableArray> popupsBeingRemoved_; | 44 base::scoped_nsobject<NSMutableArray> popupsBeingRemoved_; |
45 | 45 |
46 // For testing only. If not a zero rect, this is the screen size to use | 46 // For testing only. If not a zero rect, this is the screen size to use |
47 // for laying out popups. | 47 // for laying out popups. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // to a very small value to expedite the test running. | 92 // to a very small value to expedite the test running. |
93 - (void)setAnimationDuration:(NSTimeInterval)duration; | 93 - (void)setAnimationDuration:(NSTimeInterval)duration; |
94 | 94 |
95 // Setter for testingAnimationEndedCallback_. The testing code could set it | 95 // Setter for testingAnimationEndedCallback_. The testing code could set it |
96 // to get called back when the animation ends. | 96 // to get called back when the animation ends. |
97 - (void)setAnimationEndedCallback: | 97 - (void)setAnimationEndedCallback: |
98 (message_center::AnimationEndedCallback)callback; | 98 (message_center::AnimationEndedCallback)callback; |
99 @end | 99 @end |
100 | 100 |
101 #endif // UI_MESSAGE_CENTER_COCOA_POPUP_COLLECTION_H_ | 101 #endif // UI_MESSAGE_CENTER_COCOA_POPUP_COLLECTION_H_ |
OLD | NEW |