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; |
| 30 virtual void CancelMenu() OVERRIDE; |
28 | 31 |
29 // views::LinkListener: | 32 // views::LinkListener: |
30 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 33 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
31 | 34 |
32 LinkInfoBarDelegate* GetDelegate(); | 35 LinkInfoBarDelegate* GetDelegate(); |
33 | 36 |
34 views::Label* label_1_; | 37 views::Label* label_1_; |
35 views::Link* link_; | 38 views::Link* link_; |
36 views::Label* label_2_; | 39 views::Label* label_2_; |
37 | 40 |
38 DISALLOW_COPY_AND_ASSIGN(LinkInfoBar); | 41 DISALLOW_COPY_AND_ASSIGN(LinkInfoBar); |
39 }; | 42 }; |
40 | 43 |
41 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_LINK_INFOBAR_H_ | 44 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_LINK_INFOBAR_H_ |
OLD | NEW |