| 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_UI_VIEWS_INFOBARS_LINK_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_LINK_INFOBAR_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_LINK_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_LINK_INFOBAR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "chrome/browser/ui/views/infobars/infobar_view.h" | 11 #include "chrome/browser/ui/views/infobars/infobar_view.h" |
| 12 #include "views/controls/link_listener.h" | 12 #include "views/controls/link_listener.h" |
| 13 | 13 |
| 14 class LinkInfoBarDelegate; | 14 class LinkInfoBarDelegate; |
| 15 | 15 |
| 16 // An infobar that shows a string with an embedded link. | 16 // An infobar that shows a string with an embedded link. |
| 17 class LinkInfoBar : public InfoBarView, | 17 class LinkInfoBar : public InfoBarView, |
| 18 public views::LinkListener { | 18 public views::LinkListener { |
| 19 public: | 19 public: |
| 20 LinkInfoBar(TabContentsWrapper* owner, LinkInfoBarDelegate* delegate); | 20 LinkInfoBar(TabContentsWrapper* owner, LinkInfoBarDelegate* delegate); |
| 21 | 21 |
| 22 private: | 22 private: |
| 23 virtual ~LinkInfoBar(); | 23 virtual ~LinkInfoBar(); |
| 24 | 24 |
| 25 // InfoBarView: | 25 // InfoBarView: |
| 26 virtual void Layout(); | 26 virtual void Layout() OVERRIDE; |
| 27 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); | 27 virtual void ViewHierarchyChanged(bool is_add, |
| 28 View* parent, |
| 29 View* child) OVERRIDE; |
| 28 | 30 |
| 29 // views::LinkListener: | 31 // views::LinkListener: |
| 30 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 32 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
| 31 | 33 |
| 32 LinkInfoBarDelegate* GetDelegate(); | 34 LinkInfoBarDelegate* GetDelegate(); |
| 33 | 35 |
| 34 views::Label* label_1_; | 36 views::Label* label_1_; |
| 35 views::Link* link_; | 37 views::Link* link_; |
| 36 views::Label* label_2_; | 38 views::Label* label_2_; |
| 37 | 39 |
| 38 DISALLOW_COPY_AND_ASSIGN(LinkInfoBar); | 40 DISALLOW_COPY_AND_ASSIGN(LinkInfoBar); |
| 39 }; | 41 }; |
| 40 | 42 |
| 41 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_LINK_INFOBAR_H_ | 43 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_LINK_INFOBAR_H_ |
| OLD | NEW |