testOobeLocalization implementation
[chromium-blink-merge.git] / ui / aura / window_targeter.h
blob6244102854e4ce8a9571dfe6c577778a1622029e
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"
8 namespace aura {
10 class Window;
12 class AURA_EXPORT WindowTargeter : public ui::EventTargeter {
13 public:
14 WindowTargeter();
15 virtual ~WindowTargeter();
17 protected:
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;
27 // ui::EventTargeter:
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;
37 private:
38 Window* FindTargetInRootWindow(Window* root_window,
39 const ui::LocatedEvent& event);
41 DISALLOW_COPY_AND_ASSIGN(WindowTargeter);
44 } // namespace aura