| 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_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 private: | 44 private: |
| 45 // NotificationObserver: | 45 // NotificationObserver: |
| 46 virtual void Observe(NotificationType type, | 46 virtual void Observe(NotificationType type, |
| 47 const NotificationSource& source, | 47 const NotificationSource& source, |
| 48 const NotificationDetails& details) OVERRIDE; | 48 const NotificationDetails& details) OVERRIDE; |
| 49 | 49 |
| 50 // Makes the calls to show an arrow for |delegate| (either on the browser | 50 // Makes the calls to show an arrow for |delegate| (either on the browser |
| 51 // toolbar or on the next infobar up). | 51 // toolbar or on the next infobar up). |
| 52 void ShowArrowForDelegate(InfoBarDelegate* delegate, bool animate); | 52 void ShowArrowForDelegate(InfoBarDelegate* delegate, bool animate); |
| 53 | 53 |
| 54 // Adds an InfoBar for the specified delegate, in response to a notification | 54 // Adds the specified infobar, in response to a notification from the selected |
| 55 // from the selected TabContents. | 55 // TabContents. |
| 56 void AddInfoBar(InfoBarDelegate* delegate, bool animate); | 56 void AddInfoBar(InfoBar* infobar, bool animate); |
| 57 | 57 |
| 58 // Removes an InfoBar for the specified delegate, in response to a | 58 // Removes an InfoBar for the specified delegate, in response to a |
| 59 // notification from the selected TabContents. The InfoBar's disappearance | 59 // notification from the selected TabContents. The InfoBar's disappearance |
| 60 // will be animated. | 60 // will be animated. |
| 61 void RemoveInfoBar(InfoBarDelegate* delegate, bool animate); | 61 void RemoveInfoBar(InfoBarDelegate* delegate, bool animate); |
| 62 | 62 |
| 63 // Tells the browser window about our state so it can draw the arrow | 63 // Tells the browser window about our state so it can draw the arrow |
| 64 // appropriately. | 64 // appropriately. |
| 65 void UpdateToolbarInfoBarState(InfoBar* infobar, bool animate); | 65 void UpdateToolbarInfoBarState(InfoBar* infobar, bool animate); |
| 66 | 66 |
| 67 NotificationRegistrar registrar_; | 67 NotificationRegistrar registrar_; |
| 68 | 68 |
| 69 // The profile for the browser that hosts this InfoBarContainer. | 69 // The profile for the browser that hosts this InfoBarContainer. |
| 70 Profile* profile_; | 70 Profile* profile_; |
| 71 | 71 |
| 72 // The TabContents for which we are currently showing InfoBars. | 72 // The TabContents for which we are currently showing InfoBars. |
| 73 TabContentsWrapper* tab_contents_; | 73 TabContentsWrapper* tab_contents_; |
| 74 | 74 |
| 75 // VBox that holds the info bars. | 75 // VBox that holds the info bars. |
| 76 OwnedWidgetGtk container_; | 76 OwnedWidgetGtk container_; |
| 77 | 77 |
| 78 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerGtk); | 78 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerGtk); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ | 81 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ |
| OLD | NEW |