#ifndef CHROME_BROWSER_UI_VIEWS_SAD_TAB_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_SAD_TAB_VIEW_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/ui/sad_tab.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/link_listener.h"
#include "ui/views/view.h"
namespace content {
class WebContents;
}
namespace views {
class Label;
class LabelButton;
}
class SadTabView : public chrome::SadTab,
public views::View,
public views::LinkListener,
public views::ButtonListener {
public:
SadTabView(content::WebContents* web_contents, chrome::SadTabKind kind);
virtual ~SadTabView();
virtual void Layout() OVERRIDE;
virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
virtual void ButtonPressed(views::Button* source,
const ui::Event& event) OVERRIDE;
protected:
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
private:
virtual void Show() OVERRIDE;
virtual void Close() OVERRIDE;
views::Label* CreateLabel(const base::string16& text);
views::Link* CreateLink(const base::string16& text);
content::WebContents* web_contents_;
chrome::SadTabKind kind_;
bool painted_;
views::Label* message_;
views::Link* help_link_;
views::Link* feedback_link_;
views::LabelButton* reload_button_;
DISALLOW_COPY_AND_ASSIGN(SadTabView);
};
#endif