1 // Copyright 2014 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 #ifndef UI_VIEWS_VIEW_TARGETER_H_
6 #define UI_VIEWS_VIEW_TARGETER_H_
8 #include "ui/events/event_targeter.h"
9 #include "ui/views/views_export.h"
15 // Contains the logic used to determine the View to which an
16 // event should be dispatched. A ViewTargeter (or one of its
17 // derived classes) is installed on a View to specify the
18 // targeting behaviour to be used for the subtree rooted at
20 class VIEWS_EXPORT ViewTargeter
: public ui::EventTargeter
{
23 virtual ~ViewTargeter();
27 virtual ui::EventTarget
* FindTargetForEvent(ui::EventTarget
* root
,
28 ui::Event
* event
) OVERRIDE
;
29 virtual ui::EventTarget
* FindNextBestTarget(ui::EventTarget
* previous_target
,
30 ui::Event
* event
) OVERRIDE
;
33 View
* FindTargetForKeyEvent(View
* view
, const ui::KeyEvent
& key
);
35 DISALLOW_COPY_AND_ASSIGN(ViewTargeter
);
40 #endif // UI_VIEWS_VIEW_TARGETER_H_