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

Unified Diff: chrome/browser/ui/views/sad_tab_view.h

Issue 8574074: Add reload button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch from reload link to reload button. Created 9 years, 1 month 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/ui/views/sad_tab_view.h
diff --git a/chrome/browser/ui/views/sad_tab_view.h b/chrome/browser/ui/views/sad_tab_view.h
index 2ad400b4bd16c0b214b251320ef3ab7ab3c5dfc7..5f3085d3723779d8f23c5f5c5ce9dc1bfb28c369 100644
--- a/chrome/browser/ui/views/sad_tab_view.h
+++ b/chrome/browser/ui/views/sad_tab_view.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "views/controls/button/button.h"
#include "views/controls/link_listener.h"
#include "views/view.h"
@@ -19,6 +20,7 @@ class Font;
namespace views {
class Label;
+class TextButton;
}
///////////////////////////////////////////////////////////////////////////////
@@ -30,7 +32,8 @@ class Label;
//
///////////////////////////////////////////////////////////////////////////////
class SadTabView : public views::View,
- public views::LinkListener {
+ public views::LinkListener,
+ public views::ButtonListener {
public:
// NOTE: Do not remove or reorder the elements in this enum, and only add new
// items at the end. We depend on these specific values in a histogram.
@@ -48,6 +51,11 @@ class SadTabView : public views::View,
// Overridden from views::LinkListener:
virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
+ // Overridden from views::ButtonListener:
+ virtual void ButtonPressed(
Peter Kasting 2011/11/21 21:31:06 Nit: Wrap like this: virtual void ButtonPressed
kevers 2011/11/22 13:52:02 Done.
+ views::Button* source,
+ const views::Event& event) OVERRIDE;
+
protected:
// Overridden from views::View:
virtual void ViewHierarchyChanged(bool is_add,
@@ -58,6 +66,7 @@ class SadTabView : public views::View,
private:
views::Label* CreateLabel(const string16& text);
views::Link* CreateLink(const string16& text);
+ views::TextButton* CreateButton(const string16& text);
TabContents* tab_contents_;
Kind kind_;
@@ -66,6 +75,7 @@ class SadTabView : public views::View,
views::Label* message_;
views::Link* help_link_;
views::Link* feedback_link_;
+ views::TextButton* reload_button_;
DISALLOW_COPY_AND_ASSIGN(SadTabView);
};

Powered by Google App Engine
This is Rietveld 408576698