• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #include "ui/events/event_targeter.h"
6 
7 namespace aura {
8 
9 class Window;
10 
11 class WindowTargeter : public ui::EventTargeter {
12  public:
13   WindowTargeter();
14   virtual ~WindowTargeter();
15 
16  protected:
17   // ui::EventTargeter:
18   virtual ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
19                                               ui::Event* event) OVERRIDE;
20   virtual ui::EventTarget* FindTargetForLocatedEvent(
21       ui::EventTarget* root,
22       ui::LocatedEvent* event) OVERRIDE;
23   virtual bool SubtreeShouldBeExploredForEvent(
24       ui::EventTarget* target,
25       const ui::LocatedEvent& event) OVERRIDE;
26 
27  private:
28   Window* FindTargetInRootWindow(Window* root_window,
29                                  const ui::LocatedEvent& event);
30 
31   DISALLOW_COPY_AND_ASSIGN(WindowTargeter);
32 };
33 
34 }  // namespace aura
35