| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_INFOBARS_INFOBAR_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_CONTAINER_H_ |
| 6 #define CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_CONTAINER_H_ | 6 #define CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_CONTAINER_H_ |
| 7 | 7 |
| 8 #include "chrome/common/notification_registrar.h" | 8 #include "chrome/common/notification_registrar.h" |
| 9 #include "views/view.h" | 9 #include "views/view.h" |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 virtual void Observe(NotificationType type, | 46 virtual void Observe(NotificationType type, |
| 47 const NotificationSource& source, | 47 const NotificationSource& source, |
| 48 const NotificationDetails& details); | 48 const NotificationDetails& details); |
| 49 | 49 |
| 50 // Constructs the InfoBars needed to reflect the state of the current | 50 // Constructs the InfoBars needed to reflect the state of the current |
| 51 // TabContents associated with this container. No animations are run during | 51 // TabContents associated with this container. No animations are run during |
| 52 // this process. | 52 // this process. |
| 53 void UpdateInfoBars(); | 53 void UpdateInfoBars(); |
| 54 | 54 |
| 55 // Adds an InfoBar for the specified delegate, in response to a notification | 55 // Adds an InfoBar for the specified delegate, in response to a notification |
| 56 // from the selected TabContents. The InfoBar's appearance will be animated. | 56 // from the selected TabContents. The InfoBar's appearance will be animated |
| 57 void AddInfoBar(InfoBarDelegate* delegate); | 57 // if |use_animation| is true. |
| 58 void AddInfoBar(InfoBarDelegate* delegate, bool use_animation); |
| 58 | 59 |
| 59 // Removes an InfoBar for the specified delegate, in response to a | 60 // Removes an InfoBar for the specified delegate, in response to a |
| 60 // notification from the selected TabContents. The InfoBar's disappearance | 61 // notification from the selected TabContents. The InfoBar's disappearance |
| 61 // will be animated. | 62 // will be animated if |use_animation| is true. |
| 62 void RemoveInfoBar(InfoBarDelegate* delegate); | 63 void RemoveInfoBar(InfoBarDelegate* delegate, bool use_animation); |
| 64 |
| 65 // Replaces an InfoBar for the specified delegate with a new one. There is no |
| 66 // animation. |
| 67 void ReplaceInfoBar(InfoBarDelegate* old_delegate, |
| 68 InfoBarDelegate* new_delegate); |
| 63 | 69 |
| 64 NotificationRegistrar registrar_; | 70 NotificationRegistrar registrar_; |
| 65 | 71 |
| 66 // The BrowserView that hosts this InfoBarContainer. | 72 // The BrowserView that hosts this InfoBarContainer. |
| 67 BrowserView* browser_view_; | 73 BrowserView* browser_view_; |
| 68 | 74 |
| 69 // The TabContents for which we are currently showing InfoBars. | 75 // The TabContents for which we are currently showing InfoBars. |
| 70 TabContents* tab_contents_; | 76 TabContents* tab_contents_; |
| 71 | 77 |
| 72 DISALLOW_COPY_AND_ASSIGN(InfoBarContainer); | 78 DISALLOW_COPY_AND_ASSIGN(InfoBarContainer); |
| 73 }; | 79 }; |
| 74 | 80 |
| 75 #endif // #ifndef CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_CONTAINER_H_ | 81 #endif // #ifndef CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_CONTAINER_H_ |
| OLD | NEW |