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