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