| OLD | NEW |
| 1 // Copyright (c) 2010 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_VIEWS_INFOBARS_INFOBARS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBARS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBARS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBARS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 #include "chrome/browser/tab_contents/infobar_delegate.h" | 10 #include "chrome/browser/tab_contents/infobar_delegate.h" |
| 11 #include "ui/base/animation/animation_delegate.h" | 11 #include "ui/base/animation/animation_delegate.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 ScopedRunnableMethodFactory<InfoBar> delete_factory_; | 164 ScopedRunnableMethodFactory<InfoBar> delete_factory_; |
| 165 | 165 |
| 166 // The target height for the InfoBar. | 166 // The target height for the InfoBar. |
| 167 double target_height_; | 167 double target_height_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(InfoBar); | 169 DISALLOW_COPY_AND_ASSIGN(InfoBar); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 class AlertInfoBar : public InfoBar { | 172 class AlertInfoBar : public InfoBar { |
| 173 public: | 173 public: |
| 174 explicit AlertInfoBar(AlertInfoBarDelegate* delegate); | 174 explicit AlertInfoBar(ConfirmInfoBarDelegate* delegate); |
| 175 virtual ~AlertInfoBar(); | 175 virtual ~AlertInfoBar(); |
| 176 | 176 |
| 177 // Overridden from views::View: | 177 // Overridden from views::View: |
| 178 virtual void Layout(); | 178 virtual void Layout(); |
| 179 | 179 |
| 180 protected: | 180 protected: |
| 181 views::Label* label() const { return label_; } | 181 views::Label* label() const { return label_; } |
| 182 views::ImageView* icon() const { return icon_; } | 182 views::ImageView* icon() const { return icon_; } |
| 183 | 183 |
| 184 private: | 184 private: |
| 185 AlertInfoBarDelegate* GetDelegate(); | |
| 186 | |
| 187 views::Label* label_; | 185 views::Label* label_; |
| 188 views::ImageView* icon_; | 186 views::ImageView* icon_; |
| 189 | 187 |
| 190 DISALLOW_COPY_AND_ASSIGN(AlertInfoBar); | 188 DISALLOW_COPY_AND_ASSIGN(AlertInfoBar); |
| 191 }; | 189 }; |
| 192 | 190 |
| 193 class LinkInfoBar : public InfoBar, | 191 class LinkInfoBar : public InfoBar, |
| 194 public views::LinkController { | 192 public views::LinkController { |
| 195 public: | 193 public: |
| 196 explicit LinkInfoBar(LinkInfoBarDelegate* delegate); | 194 explicit LinkInfoBar(LinkInfoBarDelegate* delegate); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 InfoBarTextButton* cancel_button_; | 244 InfoBarTextButton* cancel_button_; |
| 247 views::Link* link_; | 245 views::Link* link_; |
| 248 | 246 |
| 249 bool initialized_; | 247 bool initialized_; |
| 250 | 248 |
| 251 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar); | 249 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar); |
| 252 }; | 250 }; |
| 253 | 251 |
| 254 | 252 |
| 255 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBARS_H_ | 253 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBARS_H_ |
| OLD | NEW |