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_TAB_CONTENTS_INFOBAR_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_INFOBAR_CONTAINER_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_CONTAINER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_CONTAINER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // object hierarchy. | 89 // object hierarchy. |
90 virtual void PlatformSpecificAddInfoBar(InfoBar* infobar, | 90 virtual void PlatformSpecificAddInfoBar(InfoBar* infobar, |
91 size_t position) = 0; | 91 size_t position) = 0; |
92 virtual void PlatformSpecificRemoveInfoBar(InfoBar* infobar) = 0; | 92 virtual void PlatformSpecificRemoveInfoBar(InfoBar* infobar) = 0; |
93 virtual void PlatformSpecificInfoBarStateChanged(bool is_animating) {} | 93 virtual void PlatformSpecificInfoBarStateChanged(bool is_animating) {} |
94 | 94 |
95 private: | 95 private: |
96 typedef std::vector<InfoBar*> InfoBars; | 96 typedef std::vector<InfoBar*> InfoBars; |
97 | 97 |
98 // NotificationObserver: | 98 // NotificationObserver: |
99 virtual void Observe(NotificationType type, | 99 virtual void Observe(int type, |
100 const NotificationSource& source, | 100 const NotificationSource& source, |
101 const NotificationDetails& details) OVERRIDE; | 101 const NotificationDetails& details) OVERRIDE; |
102 | 102 |
103 // Removes an InfoBar for the specified delegate, in response to a | 103 // Removes an InfoBar for the specified delegate, in response to a |
104 // notification from the selected TabContentsWrapper. The InfoBar's | 104 // notification from the selected TabContentsWrapper. The InfoBar's |
105 // disappearance will be animated if |use_animation| is true. Returns the | 105 // disappearance will be animated if |use_animation| is true. Returns the |
106 // position within |infobars_| the infobar was previously at. | 106 // position within |infobars_| the infobar was previously at. |
107 size_t RemoveInfoBar(InfoBarDelegate* delegate, bool use_animation); | 107 size_t RemoveInfoBar(InfoBarDelegate* delegate, bool use_animation); |
108 | 108 |
109 // Adds |infobar| to this container before the existing infobar at position | 109 // Adds |infobar| to this container before the existing infobar at position |
(...skipping 15 matching lines...) Expand all Loading... |
125 TabContentsWrapper* tab_contents_; | 125 TabContentsWrapper* tab_contents_; |
126 InfoBars infobars_; | 126 InfoBars infobars_; |
127 | 127 |
128 // Calculated in SetMaxTopArrowHeight(). | 128 // Calculated in SetMaxTopArrowHeight(). |
129 int top_arrow_target_height_; | 129 int top_arrow_target_height_; |
130 | 130 |
131 DISALLOW_COPY_AND_ASSIGN(InfoBarContainer); | 131 DISALLOW_COPY_AND_ASSIGN(InfoBarContainer); |
132 }; | 132 }; |
133 | 133 |
134 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_CONTAINER_H_ | 134 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_CONTAINER_H_ |
OLD | NEW |