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