OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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_VIEWS_INFOBARS_INFOBAR_TEXT_BUTTON_H_ |
| 6 #define CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_TEXT_BUTTON_H_ |
| 7 |
| 8 #include "views/controls/button/text_button.h" |
| 9 |
| 10 // A TextButton subclass that overrides OnMousePressed to default to |
| 11 // CustomButton so as to create pressed state effect. |
| 12 |
| 13 class InfoBarTextButton : public views::TextButton { |
| 14 public: |
| 15 // Creates a button with the specified |text|. |
| 16 static InfoBarTextButton* Create(views::ButtonListener* listener, |
| 17 const string16& text); |
| 18 // Creates a button which text is the resource string identified by |
| 19 // |message_id|. |
| 20 static InfoBarTextButton* CreateWithMessageID(views::ButtonListener* listener, |
| 21 int message_id); |
| 22 |
| 23 virtual ~InfoBarTextButton(); |
| 24 |
| 25 protected: |
| 26 InfoBarTextButton(views::ButtonListener* listener, const string16& text); |
| 27 |
| 28 // Overriden from TextButton: |
| 29 virtual bool OnMousePressed(const views::MouseEvent& e); |
| 30 |
| 31 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(InfoBarTextButton); |
| 33 }; |
| 34 |
| 35 #endif // CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_TEXT_BUTTON_H_ |
OLD | NEW |