| 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_CONTROLLER_H_ | 5 #ifndef UI_MESSAGE_CENTER_COCOA_POPUP_CONTROLLER_H_ |
| 6 #define UI_MESSAGE_CENTER_COCOA_POPUP_CONTROLLER_H_ | 6 #define UI_MESSAGE_CENTER_COCOA_POPUP_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // If the swipe-away gesture received NSEventPhaseEnded. | 39 // If the swipe-away gesture received NSEventPhaseEnded. |
| 40 BOOL swipeGestureEnded_; | 40 BOOL swipeGestureEnded_; |
| 41 | 41 |
| 42 // The frame of the popup before any swipe animation started. Used to | 42 // The frame of the popup before any swipe animation started. Used to |
| 43 // calculate the animating position of the window when swiping away. | 43 // calculate the animating position of the window when swiping away. |
| 44 NSRect originalFrame_; | 44 NSRect originalFrame_; |
| 45 | 45 |
| 46 // Is the popup currently being closed? | 46 // Is the popup currently being closed? |
| 47 BOOL isClosing_; | 47 BOOL isClosing_; |
| 48 | 48 |
| 49 #ifndef NDEBUG |
| 50 // Has the popup been closed before being dealloc-ed. |
| 51 BOOL hasBeenClosed_; |
| 52 #endif |
| 53 |
| 49 // The current bounds of the popup frame if no animation is playing. | 54 // The current bounds of the popup frame if no animation is playing. |
| 50 // Otherwise, it is the target bounds of the popup frame. | 55 // Otherwise, it is the target bounds of the popup frame. |
| 51 NSRect bounds_; | 56 NSRect bounds_; |
| 52 | 57 |
| 53 // Used to play animation when the popup shows, changes bounds and closes. | 58 // Used to play animation when the popup shows, changes bounds and closes. |
| 54 base::scoped_nsobject<NSViewAnimation> boundsAnimation_; | 59 base::scoped_nsobject<NSViewAnimation> boundsAnimation_; |
| 55 | 60 |
| 56 // Used to track the popup for mouse entered and exited events. | 61 // Used to track the popup for mouse entered and exited events. |
| 57 ui::ScopedCrTrackingArea trackingArea_; | 62 ui::ScopedCrTrackingArea trackingArea_; |
| 58 } | 63 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 85 // Returns the window bounds. This is the target bounds to go to if the bounds | 90 // Returns the window bounds. This is the target bounds to go to if the bounds |
| 86 // animation is playing. | 91 // animation is playing. |
| 87 - (NSRect)bounds; | 92 - (NSRect)bounds; |
| 88 | 93 |
| 89 // Changes the window bounds with animation. | 94 // Changes the window bounds with animation. |
| 90 - (void)setBounds:(NSRect)newBounds; | 95 - (void)setBounds:(NSRect)newBounds; |
| 91 | 96 |
| 92 @end | 97 @end |
| 93 | 98 |
| 94 #endif // UI_MESSAGE_CENTER_COCOA_POPUP_CONTROLLER_H_ | 99 #endif // UI_MESSAGE_CENTER_COCOA_POPUP_CONTROLLER_H_ |
| OLD | NEW |