Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Unified Diff: chrome/browser/views/infobars/infobar_text_button.h

Issue 2602003: Refactored the translate infobars. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Synced Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/views/infobars/infobar_text_button.h
diff --git a/chrome/browser/views/infobars/infobar_text_button.h b/chrome/browser/views/infobars/infobar_text_button.h
new file mode 100644
index 0000000000000000000000000000000000000000..698d2a4733e270ee41337eb5bf161a9ee257a715
--- /dev/null
+++ b/chrome/browser/views/infobars/infobar_text_button.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_TEXT_BUTTON_H_
+#define CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_TEXT_BUTTON_H_
+
+#include "views/controls/button/text_button.h"
+
+// A TextButton subclass that overrides OnMousePressed to default to
+// CustomButton so as to create pressed state effect.
+
+class InfoBarTextButton : public views::TextButton {
+ public:
+ // Creates a button with the specified |text|.
+ static InfoBarTextButton* Create(views::ButtonListener* listener,
+ const string16& text);
+ // Creates a button which text is the resource string identified by
+ // |message_id|.
+ static InfoBarTextButton* CreateWithMessageID(views::ButtonListener* listener,
+ int message_id);
+
+ virtual ~InfoBarTextButton();
+
+ protected:
+ InfoBarTextButton(views::ButtonListener* listener, const string16& text);
+
+ // Overriden from TextButton:
+ virtual bool OnMousePressed(const views::MouseEvent& e);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(InfoBarTextButton);
+};
+
+#endif // CHROME_BROWSER_VIEWS_INFOBARS_INFOBAR_TEXT_BUTTON_H_
« no previous file with comments | « chrome/browser/views/infobars/infobar_button_border.cc ('k') | chrome/browser/views/infobars/infobar_text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698