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

Side by Side Diff: ui/message_center/cocoa/popup_controller.h

Issue 857463003: mac: Fix a dangling delegate bug with MCPopupController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from avi, round two. Created 5 years, 11 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
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 #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
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
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_
OLDNEW
« no previous file with comments | « ui/message_center/cocoa/popup_collection.mm ('k') | ui/message_center/cocoa/popup_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698