OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_CONTAINER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_CONTAINER_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_CONTAINER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_CONTAINER_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 base::scoped_nsobject<NSMutableArray> infobarControllers_; | 51 base::scoped_nsobject<NSMutableArray> infobarControllers_; |
52 | 52 |
53 // The C++ instance that bridges to the cross platform code. | 53 // The C++ instance that bridges to the cross platform code. |
54 scoped_ptr<InfoBarContainerCocoa> containerCocoa_; | 54 scoped_ptr<InfoBarContainerCocoa> containerCocoa_; |
55 | 55 |
56 // If YES then the first info bar doesn't draw a tip. | 56 // If YES then the first info bar doesn't draw a tip. |
57 BOOL shouldSuppressTopInfoBarTip_; | 57 BOOL shouldSuppressTopInfoBarTip_; |
58 | 58 |
59 // If YES then an infobar animation is in progress. | 59 // If YES then an infobar animation is in progress. |
60 BOOL isAnimating_; | 60 BOOL isAnimating_; |
61 | |
62 // The last overlap tip height. This is used to ensure that the info bar | |
63 // position is updated if the infobar height doesn't change but the overlap | |
64 // does change. | |
65 int oldOverlappingTipHeight_; | |
66 } | 61 } |
67 | 62 |
68 @property(nonatomic, assign) BOOL shouldSuppressTopInfoBarTip; | 63 @property(nonatomic, assign) BOOL shouldSuppressTopInfoBarTip; |
69 | 64 |
70 - (id)initWithResizeDelegate:(id<ViewResizer>)resizeDelegate; | 65 - (id)initWithResizeDelegate:(id<ViewResizer>)resizeDelegate; |
71 | 66 |
72 // Modifies this container to display infobars for the given |contents|. | 67 // Modifies this container to display infobars for the given |contents|. |
73 - (void)changeWebContents:(content::WebContents*)contents; | 68 - (void)changeWebContents:(content::WebContents*)contents; |
74 | 69 |
75 // Stripped down version of TabStripModelObserverBridge:tabDetachedWithContents. | 70 // Stripped down version of TabStripModelObserverBridge:tabDetachedWithContents. |
(...skipping 12 matching lines...) Expand all Loading... |
88 // Removes the given infobar. | 83 // Removes the given infobar. |
89 - (void)removeInfoBar:(InfoBarCocoa*)infobar; | 84 - (void)removeInfoBar:(InfoBarCocoa*)infobar; |
90 | 85 |
91 // Positions the infobar views in the container view and notifies | 86 // Positions the infobar views in the container view and notifies |
92 // |browser_controller_| that it needs to resize the container view. | 87 // |browser_controller_| that it needs to resize the container view. |
93 - (void)positionInfoBarsAndRedraw:(BOOL)isAnimating; | 88 - (void)positionInfoBarsAndRedraw:(BOOL)isAnimating; |
94 | 89 |
95 // Set the max arrow height of the top infobar. | 90 // Set the max arrow height of the top infobar. |
96 - (void)setMaxTopArrowHeight:(NSInteger)height; | 91 - (void)setMaxTopArrowHeight:(NSInteger)height; |
97 | 92 |
| 93 // The height of all the info bars. Does not include the top arrow. |
| 94 - (CGFloat)heightOfInfoBars; |
| 95 |
98 @end | 96 @end |
99 | 97 |
100 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_CONTAINER_CONTROLLER_H_ | 98 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_CONTAINER_CONTROLLER_H_ |
OLD | NEW |