1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/aura/aura_export.h"
6 #include "ui/events/event_targeter.h"
12 class AURA_EXPORT WindowTargeter
: public ui::EventTargeter
{
15 virtual ~WindowTargeter();
18 bool WindowCanAcceptEvent(aura::Window
* window
,
19 const ui::LocatedEvent
& event
) const;
21 // Returns whether the location of the event is in an actionable region of the
22 // window. Note that the location etc. of |event| is in the |window|'s
23 // parent's coordinate system.
24 virtual bool EventLocationInsideBounds(aura::Window
* window
,
25 const ui::LocatedEvent
& event
) const;
28 virtual ui::EventTarget
* FindTargetForEvent(ui::EventTarget
* root
,
29 ui::Event
* event
) OVERRIDE
;
30 virtual ui::EventTarget
* FindTargetForLocatedEvent(
31 ui::EventTarget
* root
,
32 ui::LocatedEvent
* event
) OVERRIDE
;
33 virtual bool SubtreeShouldBeExploredForEvent(
34 ui::EventTarget
* target
,
35 const ui::LocatedEvent
& event
) OVERRIDE
;
38 Window
* FindTargetInRootWindow(Window
* root_window
,
39 const ui::LocatedEvent
& event
);
41 DISALLOW_COPY_AND_ASSIGN(WindowTargeter
);