#ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_BORDER_H_
#define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_BORDER_H_
#include "ui/gfx/image/image_skia.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/linux_ui/native_theme_change_observer.h"
namespace gfx {
class Canvas;
}
namespace views {
class LabelButton;
class Border;
}
namespace libgtk2ui {
class Gtk2UI;
class Gtk2Border : public views::Border,
public views::NativeThemeChangeObserver {
public:
Gtk2Border(Gtk2UI* gtk2_ui,
views::LabelButton* owning_button,
scoped_ptr<views::Border> border);
virtual ~Gtk2Border();
virtual void Paint(const views::View& view, gfx::Canvas* canvas) OVERRIDE;
virtual gfx::Insets GetInsets() const OVERRIDE;
virtual gfx::Size GetMinimumSize() const OVERRIDE;
virtual void OnNativeThemeChanged() OVERRIDE;
private:
void PaintState(const ui::NativeTheme::State state,
const ui::NativeTheme::ExtraParams& extra,
const gfx::Rect& rect,
gfx::Canvas* canvas);
bool ShouldDrawBorder(bool focused, views::Button::ButtonState state);
Gtk2UI* gtk2_ui_;
gfx::ImageSkia button_images_[2][views::Button::STATE_COUNT];
views::LabelButton* owning_button_;
scoped_ptr<views::Border> border_;
DISALLOW_COPY_AND_ASSIGN(Gtk2Border);
};
}
#endif