OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_INFOBARS_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_INFOBARS_INFOBAR_H_ |
6 #define CHROME_BROWSER_INFOBARS_INFOBAR_H_ | 6 #define CHROME_BROWSER_INFOBARS_INFOBAR_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 void RemoveSelf(); | 82 void RemoveSelf(); |
83 | 83 |
84 // Changes the target height of the main ("bar") portion of the infobar. | 84 // Changes the target height of the main ("bar") portion of the infobar. |
85 void SetBarTargetHeight(int height); | 85 void SetBarTargetHeight(int height); |
86 | 86 |
87 // Given a control with size |prefsize|, returns the centered y position | 87 // Given a control with size |prefsize|, returns the centered y position |
88 // within us, taking into account animation so the control "slides in" (or | 88 // within us, taking into account animation so the control "slides in" (or |
89 // out) as we animate open and closed. | 89 // out) as we animate open and closed. |
90 int OffsetY(const gfx::Size& prefsize) const; | 90 int OffsetY(const gfx::Size& prefsize) const; |
91 | 91 |
92 bool owned() const { return !!owner_; } | 92 InfoBarService* owner() const { return owner_; } |
93 const InfoBarContainer* container() const { return container_; } | 93 const InfoBarContainer* container() const { return container_; } |
94 InfoBarContainer* container() { return container_; } | 94 InfoBarContainer* container() { return container_; } |
95 ui::SlideAnimation* animation() { return &animation_; } | 95 ui::SlideAnimation* animation() { return &animation_; } |
96 int bar_height() const { return bar_height_; } | 96 int bar_height() const { return bar_height_; } |
97 int bar_target_height() const { return bar_target_height_; } | 97 int bar_target_height() const { return bar_target_height_; } |
98 | 98 |
99 // Platforms may optionally override these if they need to do work during | 99 // Platforms may optionally override these if they need to do work during |
100 // processing of the given calls. | 100 // processing of the given calls. |
101 virtual void PlatformSpecificShow(bool animate) {} | 101 virtual void PlatformSpecificShow(bool animate) {} |
102 virtual void PlatformSpecificHide(bool animate) {} | 102 virtual void PlatformSpecificHide(bool animate) {} |
(...skipping 30 matching lines...) Expand all Loading... |
133 int bar_target_height_; | 133 int bar_target_height_; |
134 | 134 |
135 DISALLOW_COPY_AND_ASSIGN(InfoBar); | 135 DISALLOW_COPY_AND_ASSIGN(InfoBar); |
136 }; | 136 }; |
137 | 137 |
138 #elif defined(OS_MACOSX) | 138 #elif defined(OS_MACOSX) |
139 #include "chrome/browser/ui/cocoa/infobars/infobar.h" | 139 #include "chrome/browser/ui/cocoa/infobars/infobar.h" |
140 #endif | 140 #endif |
141 | 141 |
142 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_H_ | 142 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_H_ |
OLD | NEW |