| 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 <memory> |
| 11 |
| 10 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #import "chrome/browser/ui/cocoa/view_resizer.h" | 13 #import "chrome/browser/ui/cocoa/view_resizer.h" |
| 13 | 14 |
| 14 @class BrowserWindowController; | 15 @class BrowserWindowController; |
| 15 @class InfoBarController; | 16 @class InfoBarController; |
| 16 class InfoBarCocoa; | 17 class InfoBarCocoa; |
| 17 class InfoBarContainerCocoa; | 18 class InfoBarContainerCocoa; |
| 18 class TabStripModel; | 19 class TabStripModel; |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 class WebContents; | 22 class WebContents; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 43 // Needed to send resize messages when infobars are added or removed. | 44 // Needed to send resize messages when infobars are added or removed. |
| 44 id<ViewResizer> resizeDelegate_; // weak | 45 id<ViewResizer> resizeDelegate_; // weak |
| 45 | 46 |
| 46 // The WebContents we are currently showing infobars for. | 47 // The WebContents we are currently showing infobars for. |
| 47 content::WebContents* currentWebContents_; // weak | 48 content::WebContents* currentWebContents_; // weak |
| 48 | 49 |
| 49 // Holds the InfoBarControllers currently owned by this container. | 50 // Holds the InfoBarControllers currently owned by this container. |
| 50 base::scoped_nsobject<NSMutableArray> infobarControllers_; | 51 base::scoped_nsobject<NSMutableArray> infobarControllers_; |
| 51 | 52 |
| 52 // The C++ instance that bridges to the cross platform code. | 53 // The C++ instance that bridges to the cross platform code. |
| 53 scoped_ptr<InfoBarContainerCocoa> containerCocoa_; | 54 std::unique_ptr<InfoBarContainerCocoa> containerCocoa_; |
| 54 | 55 |
| 55 // 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. |
| 56 BOOL shouldSuppressTopInfoBarTip_; | 57 BOOL shouldSuppressTopInfoBarTip_; |
| 57 | 58 |
| 58 // The x-position of the infobar arrow. | 59 // The x-position of the infobar arrow. |
| 59 CGFloat infobarArrowX_; | 60 CGFloat infobarArrowX_; |
| 60 | 61 |
| 61 // If YES then an infobar animation is in progress. | 62 // If YES then an infobar animation is in progress. |
| 62 BOOL isAnimating_; | 63 BOOL isAnimating_; |
| 63 } | 64 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 92 | 93 |
| 93 // Set the max arrow height of the top infobar. | 94 // Set the max arrow height of the top infobar. |
| 94 - (void)setMaxTopArrowHeight:(NSInteger)height; | 95 - (void)setMaxTopArrowHeight:(NSInteger)height; |
| 95 | 96 |
| 96 // The height of all the info bars. Does not include the top arrow. | 97 // The height of all the info bars. Does not include the top arrow. |
| 97 - (CGFloat)heightOfInfoBars; | 98 - (CGFloat)heightOfInfoBars; |
| 98 | 99 |
| 99 @end | 100 @end |
| 100 | 101 |
| 101 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_CONTAINER_CONTROLLER_H_ | 102 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_CONTAINER_CONTROLLER_H_ |
| OLD | NEW |