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