| 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 "chrome/browser/ui/gtk/owned_widget_gtk.h" | 10 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Constructs the InfoBars needed to reflect the state of the current | 49 // Constructs the InfoBars needed to reflect the state of the current |
| 50 // TabContents associated with this container. No animations are run during | 50 // TabContents associated with this container. No animations are run during |
| 51 // this process. | 51 // this process. |
| 52 void UpdateInfoBars(); | 52 void UpdateInfoBars(); |
| 53 | 53 |
| 54 // Makes the calls to show an arrow for |delegate| (either on the browser | 54 // Makes the calls to show an arrow for |delegate| (either on the browser |
| 55 // toolbar or on the next infobar up). | 55 // toolbar or on the next infobar up). |
| 56 void ShowArrowForDelegate(InfoBarDelegate* delegate, bool animate); | 56 void ShowArrowForDelegate(InfoBarDelegate* delegate, bool animate); |
| 57 | 57 |
| 58 // Adds an InfoBar for the specified delegate, in response to a notification | 58 // Adds the specified infobar, in response to a notification from the selected |
| 59 // from the selected TabContents. | 59 // TabContents. |
| 60 void AddInfoBar(InfoBarDelegate* delegate, bool animate); | 60 void AddInfoBar(InfoBar* infobar, bool animate); |
| 61 | 61 |
| 62 // Removes an InfoBar for the specified delegate, in response to a | 62 // Removes an InfoBar for the specified delegate, in response to a |
| 63 // notification from the selected TabContents. The InfoBar's disappearance | 63 // notification from the selected TabContents. The InfoBar's disappearance |
| 64 // will be animated. | 64 // will be animated. |
| 65 void RemoveInfoBar(InfoBarDelegate* delegate, bool animate); | 65 void RemoveInfoBar(InfoBarDelegate* delegate, bool animate); |
| 66 | 66 |
| 67 // Tells the browser window about our state so it can draw the arrow | 67 // Tells the browser window about our state so it can draw the arrow |
| 68 // appropriately. | 68 // appropriately. |
| 69 void UpdateToolbarInfoBarState(InfoBar* infobar, bool animate); | 69 void UpdateToolbarInfoBarState(InfoBar* infobar, bool animate); |
| 70 | 70 |
| 71 NotificationRegistrar registrar_; | 71 NotificationRegistrar registrar_; |
| 72 | 72 |
| 73 // The profile for the browser that hosts this InfoBarContainer. | 73 // The profile for the browser that hosts this InfoBarContainer. |
| 74 Profile* profile_; | 74 Profile* profile_; |
| 75 | 75 |
| 76 // The TabContents for which we are currently showing InfoBars. | 76 // The TabContents for which we are currently showing InfoBars. |
| 77 TabContentsWrapper* tab_contents_; | 77 TabContentsWrapper* tab_contents_; |
| 78 | 78 |
| 79 // VBox that holds the info bars. | 79 // VBox that holds the info bars. |
| 80 OwnedWidgetGtk container_; | 80 OwnedWidgetGtk container_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerGtk); | 82 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerGtk); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ | 85 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ |
| OLD | NEW |