#ifndef UI_AURA_WINDOW_TARGETER_H_
#define UI_AURA_WINDOW_TARGETER_H_
#include "ui/aura/aura_export.h"
#include "ui/events/event_targeter.h"
namespace aura {
class Window;
class AURA_EXPORT WindowTargeter : public ui::EventTargeter {
public:
WindowTargeter();
virtual ~WindowTargeter();
protected:
bool WindowCanAcceptEvent(aura::Window* window,
const ui::LocatedEvent& event) const;
virtual bool EventLocationInsideBounds(aura::Window* window,
const ui::LocatedEvent& event) const;
virtual ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
ui::Event* event) OVERRIDE;
virtual ui::EventTarget* FindTargetForLocatedEvent(
ui::EventTarget* root,
ui::LocatedEvent* event) OVERRIDE;
virtual bool SubtreeShouldBeExploredForEvent(
ui::EventTarget* target,
const ui::LocatedEvent& event) OVERRIDE;
private:
Window* FindTargetForKeyEvent(Window* root_window,
const ui::KeyEvent& event);
Window* FindTargetInRootWindow(Window* root_window,
const ui::LocatedEvent& event);
DISALLOW_COPY_AND_ASSIGN(WindowTargeter);
};
}
#endif