Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: ui/events/event_targeter.h

Issue 401933002: Move views event targeting into ViewTargeterDelegate::TargetForRect() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/views/view.h » ('j') | ui/views/view_targeter.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_EVENT_TARGETER_H_ 5 #ifndef UI_EVENTS_EVENT_TARGETER_H_
6 #define UI_EVENTS_EVENT_TARGETER_H_ 6 #define UI_EVENTS_EVENT_TARGETER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/events_export.h" 10 #include "ui/events/events_export.h"
11 11
12 namespace ui { 12 namespace ui {
13 13
14 class Event; 14 class Event;
15 class EventTarget; 15 class EventTarget;
16 class LocatedEvent; 16 class LocatedEvent;
17 17
18 // TODO(tdanderson|sadrul): Make EventTargeter a pure virtual interface
19 // with only two methods: FindTargetForEvent()
20 // and FindNextBestTarget().
sadrul 2014/07/18 22:17:33 This is unrelated to the rest of the CL. Remove (y
tdanderson 2014/07/19 17:32:53 Removed, and I will file a separate bug for this.
18 class EVENTS_EXPORT EventTargeter { 21 class EVENTS_EXPORT EventTargeter {
19 public: 22 public:
20 virtual ~EventTargeter(); 23 virtual ~EventTargeter();
21 24
22 // Returns the target |event| should be dispatched to. If there is no such 25 // Returns the target |event| should be dispatched to. If there is no such
23 // target, this should return NULL. 26 // target, this should return NULL.
24 virtual EventTarget* FindTargetForEvent(EventTarget* root, 27 virtual EventTarget* FindTargetForEvent(EventTarget* root,
25 Event* event); 28 Event* event);
26 29
27 // Same as FindTargetForEvent(), but used for positional events. The location 30 // Same as FindTargetForEvent(), but used for positional events. The location
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Returns whether the location of the event is in an actionable region of the 64 // Returns whether the location of the event is in an actionable region of the
62 // target. Note that the location etc. of |event| is in the |target|'s 65 // target. Note that the location etc. of |event| is in the |target|'s
63 // parent's coordinate system. 66 // parent's coordinate system.
64 virtual bool EventLocationInsideBounds(EventTarget* target, 67 virtual bool EventLocationInsideBounds(EventTarget* target,
65 const LocatedEvent& event) const; 68 const LocatedEvent& event) const;
66 }; 69 };
67 70
68 } // namespace ui 71 } // namespace ui
69 72
70 #endif // UI_EVENTS_EVENT_TARGETER_H_ 73 #endif // UI_EVENTS_EVENT_TARGETER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/view.h » ('j') | ui/views/view_targeter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698