| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // IMPORTANT: This MUST NOT result in a call back to | 65 // IMPORTANT: This MUST NOT result in a call back to |
| 66 // Delegate::InfoBarContainerStateChanged() unless it causes an actual | 66 // Delegate::InfoBarContainerStateChanged() unless it causes an actual |
| 67 // change, lest we infinitely recurse. | 67 // change, lest we infinitely recurse. |
| 68 void SetMaxTopArrowHeight(int height); | 68 void SetMaxTopArrowHeight(int height); |
| 69 | 69 |
| 70 // Called when a contained infobar has animated or by some other means changed | 70 // Called when a contained infobar has animated or by some other means changed |
| 71 // its height, or when it stops animating. The container is expected to do | 71 // its height, or when it stops animating. The container is expected to do |
| 72 // anything necessary to respond, e.g. re-layout. | 72 // anything necessary to respond, e.g. re-layout. |
| 73 void OnInfoBarStateChanged(bool is_animating); | 73 void OnInfoBarStateChanged(bool is_animating); |
| 74 | 74 |
| 75 // Removes the specified InfoBarDelegate from the selected TabContentsWrapper. | |
| 76 // This will notify us back and cause us to close the InfoBar. This is called | |
| 77 // from the InfoBar's close button handler. | |
| 78 void RemoveDelegate(InfoBarDelegate* delegate); | |
| 79 | |
| 80 // Called by |infobar| to request that it be removed from the container, as it | 75 // Called by |infobar| to request that it be removed from the container, as it |
| 81 // is about to delete itself. At this point, |infobar| should already be | 76 // is about to delete itself. At this point, |infobar| should already be |
| 82 // hidden. | 77 // hidden. |
| 83 void RemoveInfoBar(InfoBar* infobar); | 78 void RemoveInfoBar(InfoBar* infobar); |
| 84 | 79 |
| 85 const Delegate* delegate() const { return delegate_; } | 80 const Delegate* delegate() const { return delegate_; } |
| 86 | 81 |
| 87 protected: | 82 protected: |
| 88 // Subclasses must call this during destruction, so that we can remove | 83 // Subclasses must call this during destruction, so that we can remove |
| 89 // infobars (which will call the pure virtual functions below) while the | 84 // infobars (which will call the pure virtual functions below) while the |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 TabContentsWrapper* tab_contents_; | 124 TabContentsWrapper* tab_contents_; |
| 130 InfoBars infobars_; | 125 InfoBars infobars_; |
| 131 | 126 |
| 132 // Calculated in SetMaxTopArrowHeight(). | 127 // Calculated in SetMaxTopArrowHeight(). |
| 133 int top_arrow_target_height_; | 128 int top_arrow_target_height_; |
| 134 | 129 |
| 135 DISALLOW_COPY_AND_ASSIGN(InfoBarContainer); | 130 DISALLOW_COPY_AND_ASSIGN(InfoBarContainer); |
| 136 }; | 131 }; |
| 137 | 132 |
| 138 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_CONTAINER_H_ | 133 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_CONTAINER_H_ |
| OLD | NEW |