| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_INFOBARS_CORE_INFOBAR_CONTAINER_H_ | 5 #ifndef COMPONENTS_INFOBARS_CORE_INFOBAR_CONTAINER_H_ |
| 6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_CONTAINER_H_ | 6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_CONTAINER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // Changes the InfoBarManager for which this container is showing infobars. | 48 // Changes the InfoBarManager for which this container is showing infobars. |
| 49 // This will hide all current infobars, remove them from the container, add | 49 // This will hide all current infobars, remove them from the container, add |
| 50 // the infobars from |infobar_manager|, and show them all. |infobar_manager| | 50 // the infobars from |infobar_manager|, and show them all. |infobar_manager| |
| 51 // may be NULL. | 51 // may be NULL. |
| 52 void ChangeInfoBarManager(InfoBarManager* infobar_manager); | 52 void ChangeInfoBarManager(InfoBarManager* infobar_manager); |
| 53 | 53 |
| 54 // Returns the amount by which to overlap the toolbar above, and, when | 54 // Returns the amount by which to overlap the toolbar above, and, when |
| 55 // |total_height| is non-NULL, set it to the height of the InfoBarContainer | 55 // |total_height| is non-NULL, set it to the height of the InfoBarContainer |
| 56 // (including overlap). | 56 // (including overlap). |
| 57 int GetVerticalOverlap(int* total_height); | 57 int GetVerticalOverlap(int* total_height) const; |
| 58 | 58 |
| 59 // Called by the delegate when the distance between what the top infobar's | 59 // Called by the delegate when the distance between what the top infobar's |
| 60 // "unspoofable" arrow would point to and the top infobar itself changes. | 60 // "unspoofable" arrow would point to and the top infobar itself changes. |
| 61 // This enables the top infobar to show a longer arrow (e.g. because of a | 61 // This enables the top infobar to show a longer arrow (e.g. because of a |
| 62 // visible bookmark bar) or shorter (e.g. due to being in a popup window) if | 62 // visible bookmark bar) or shorter (e.g. due to being in a popup window) if |
| 63 // desired. | 63 // desired. |
| 64 // | 64 // |
| 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. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 // Calculated in SetMaxTopArrowHeight(). | 129 // Calculated in SetMaxTopArrowHeight(). |
| 130 int top_arrow_target_height_; | 130 int top_arrow_target_height_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(InfoBarContainer); | 132 DISALLOW_COPY_AND_ASSIGN(InfoBarContainer); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 } // namespace infobars | 135 } // namespace infobars |
| 136 | 136 |
| 137 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_CONTAINER_H_ | 137 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_CONTAINER_H_ |
| OLD | NEW |