| 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/memory/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #import "chrome/browser/ui/cocoa/view_resizer.h" | 12 #import "chrome/browser/ui/cocoa/view_resizer.h" |
| 13 #include "content/public/browser/notification_registrar.h" | 13 #include "content/public/browser/notification_registrar.h" |
| 14 | 14 |
| 15 @class BrowserWindowController; | 15 @class BrowserWindowController; |
| 16 @class InfoBarController; | 16 @class InfoBarController; |
| 17 class InfoBar; | 17 class InfoBar; |
| 18 class InfoBarDelegate; | 18 class InfoBarDelegate; |
| 19 class InfoBarNotificationObserver; | 19 class InfoBarNotificationObserver; |
| 20 class TabStripModel; | 20 class TabStripModel; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 51 @interface InfoBarContainerController : NSViewController <ViewResizer, | 51 @interface InfoBarContainerController : NSViewController <ViewResizer, |
| 52 InfoBarContainer> { | 52 InfoBarContainer> { |
| 53 @private | 53 @private |
| 54 // Needed to send resize messages when infobars are added or removed. | 54 // Needed to send resize messages when infobars are added or removed. |
| 55 id<ViewResizer> resizeDelegate_; // weak | 55 id<ViewResizer> resizeDelegate_; // weak |
| 56 | 56 |
| 57 // The WebContents we are currently showing infobars for. | 57 // The WebContents we are currently showing infobars for. |
| 58 content::WebContents* currentWebContents_; // weak | 58 content::WebContents* currentWebContents_; // weak |
| 59 | 59 |
| 60 // Holds the InfoBarControllers currently owned by this container. | 60 // Holds the InfoBarControllers currently owned by this container. |
| 61 scoped_nsobject<NSMutableArray> infobarControllers_; | 61 base::scoped_nsobject<NSMutableArray> infobarControllers_; |
| 62 | 62 |
| 63 // Holds InfoBarControllers when they are in the process of animating out. | 63 // Holds InfoBarControllers when they are in the process of animating out. |
| 64 scoped_nsobject<NSMutableSet> closingInfoBars_; | 64 base::scoped_nsobject<NSMutableSet> closingInfoBars_; |
| 65 | 65 |
| 66 // Lets us registers for INFOBAR_ADDED/INFOBAR_REMOVED | 66 // Lets us registers for INFOBAR_ADDED/INFOBAR_REMOVED |
| 67 // notifications. The actual notifications are sent to the | 67 // notifications. The actual notifications are sent to the |
| 68 // InfoBarNotificationObserver object, which proxies them back to us. | 68 // InfoBarNotificationObserver object, which proxies them back to us. |
| 69 content::NotificationRegistrar registrar_; | 69 content::NotificationRegistrar registrar_; |
| 70 scoped_ptr<InfoBarNotificationObserver> infoBarObserver_; | 70 scoped_ptr<InfoBarNotificationObserver> infoBarObserver_; |
| 71 | 71 |
| 72 // If YES then the first info bar doesn't draw a tip. | 72 // If YES then the first info bar doesn't draw a tip. |
| 73 BOOL shouldSuppressTopInfoBarTip_; | 73 BOOL shouldSuppressTopInfoBarTip_; |
| 74 } | 74 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // Removes all infobar views. Infobars which were already closing will be | 134 // Removes all infobar views. Infobars which were already closing will be |
| 135 // completely closed (i.e. the InfoBarDelegate will be deleted and we'll get a | 135 // completely closed (i.e. the InfoBarDelegate will be deleted and we'll get a |
| 136 // callback to removeController). Other infobars will simply stop animating and | 136 // callback to removeController). Other infobars will simply stop animating and |
| 137 // disappear. Callers must call positionInfoBarsAndRedraw() after calling this | 137 // disappear. Callers must call positionInfoBarsAndRedraw() after calling this |
| 138 // method. | 138 // method. |
| 139 - (void)removeAllInfoBars; | 139 - (void)removeAllInfoBars; |
| 140 | 140 |
| 141 @end | 141 @end |
| 142 | 142 |
| 143 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_CONTAINER_CONTROLLER_H_ | 143 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_CONTAINER_CONTROLLER_H_ |
| OLD | NEW |