| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 virtual void Observe(NotificationType type, | 50 virtual void Observe(NotificationType type, |
| 51 const NotificationSource& source, | 51 const NotificationSource& source, |
| 52 const NotificationDetails& details); | 52 const NotificationDetails& details); |
| 53 | 53 |
| 54 // Constructs the InfoBars needed to reflect the state of the current | 54 // Constructs the InfoBars needed to reflect the state of the current |
| 55 // TabContents associated with this container. No animations are run during | 55 // TabContents associated with this container. No animations are run during |
| 56 // this process. | 56 // this process. |
| 57 void UpdateInfoBars(); | 57 void UpdateInfoBars(); |
| 58 | 58 |
| 59 // Adds an InfoBar for the specified delegate, in response to a notification | 59 // Adds an InfoBar for the specified delegate, in response to a notification |
| 60 // from the selected TabContents. The InfoBar's appearance will be animated. | 60 // from the selected TabContents. The InfoBar's appearance will be animated |
| 61 void AddInfoBar(InfoBarDelegate* delegate); | 61 // if |use_animation| is true. |
| 62 void AddInfoBar(InfoBarDelegate* delegate, bool use_animation); |
| 62 | 63 |
| 63 // Removes an InfoBar for the specified delegate, in response to a | 64 // Removes an InfoBar for the specified delegate, in response to a |
| 64 // notification from the selected TabContents. The InfoBar's disappearance | 65 // notification from the selected TabContents. The InfoBar's disappearance |
| 65 // will be animated. | 66 // will be animated if |use_animation| is true. |
| 66 void RemoveInfoBar(InfoBarDelegate* delegate); | 67 void RemoveInfoBar(InfoBarDelegate* delegate, bool use_animation); |
| 68 |
| 69 // Replaces an InfoBar for the specified delegate with a new one. There is no |
| 70 // animation. |
| 71 void ReplaceInfoBar(InfoBarDelegate* old_delegate, |
| 72 InfoBarDelegate* new_delegate); |
| 67 | 73 |
| 68 NotificationRegistrar registrar_; | 74 NotificationRegistrar registrar_; |
| 69 | 75 |
| 70 // The BrowserView that hosts this InfoBarContainer. | 76 // The BrowserView that hosts this InfoBarContainer. |
| 71 BrowserView* browser_view_; | 77 BrowserView* browser_view_; |
| 72 | 78 |
| 73 // The TabContents for which we are currently showing InfoBars. | 79 // The TabContents for which we are currently showing InfoBars. |
| 74 TabContents* tab_contents_; | 80 TabContents* tab_contents_; |
| 75 | 81 |
| 76 // Storage of the string needed for accessibility. | 82 // Storage of the string needed for accessibility. |
| 77 std::wstring accessible_name_; | 83 std::wstring accessible_name_; |
| 78 | 84 |
| 79 DISALLOW_COPY_AND_ASSIGN(InfoBarContainer); | 85 DISALLOW_COPY_AND_ASSIGN(InfoBarContainer); |
| 80 }; | 86 }; |
| 81 | 87 |
| 82 #endif // #ifndef CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_CONTAINER_H_ | 88 #endif // #ifndef CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_CONTAINER_H_ |
| OLD | NEW |