#ifndef ASH_SYSTEM_TRAY_ACTIONABLE_VIEW_H_
#define ASH_SYSTEM_TRAY_ACTIONABLE_VIEW_H_
#include "ash/ash_export.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/views/view.h"
namespace ash {
class ASH_EXPORT ActionableView : public views::View {
public:
static const char kViewClassName[];
ActionableView();
virtual ~ActionableView();
void SetAccessibleName(const base::string16& name);
const base::string16& accessible_name() const { return accessible_name_; }
protected:
void OnPaintFocus(gfx::Canvas* canvas);
virtual gfx::Rect GetFocusBounds();
virtual bool PerformAction(const ui::Event& event) = 0;
virtual const char* GetClassName() const OVERRIDE;
virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
virtual void OnMouseCaptureLost() OVERRIDE;
virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
virtual void OnFocus() OVERRIDE;
virtual void OnBlur() OVERRIDE;
virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
private:
base::string16 accessible_name_;
bool has_capture_;
DISALLOW_COPY_AND_ASSIGN(ActionableView);
};
}
#endif