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

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

Issue 724973003: Get event targetting working for mouse events. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: More comments, de-const a bunch of stuff in ui/. Created 6 years, 1 month 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
« no previous file with comments | « ui/events/event_dispatcher_unittest.cc ('k') | ui/events/event_target_iterator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TARGET_H_ 5 #ifndef UI_EVENTS_EVENT_TARGET_H_
6 #define UI_EVENTS_EVENT_TARGET_H_ 6 #define UI_EVENTS_EVENT_TARGET_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 29 matching lines...) Expand all
40 EventTarget(); 40 EventTarget();
41 ~EventTarget() override; 41 ~EventTarget() override;
42 42
43 virtual bool CanAcceptEvent(const Event& event) = 0; 43 virtual bool CanAcceptEvent(const Event& event) = 0;
44 44
45 // Returns the parent EventTarget in the event-target tree. 45 // Returns the parent EventTarget in the event-target tree.
46 virtual EventTarget* GetParentTarget() = 0; 46 virtual EventTarget* GetParentTarget() = 0;
47 47
48 // Returns an iterator an EventTargeter can use to iterate over the list of 48 // Returns an iterator an EventTargeter can use to iterate over the list of
49 // child EventTargets. 49 // child EventTargets.
50 virtual scoped_ptr<EventTargetIterator> GetChildIterator() const = 0; 50 virtual scoped_ptr<EventTargetIterator> GetChildIterator() = 0;
51 51
52 // Returns the EventTargeter that should be used to find the target for an 52 // Returns the EventTargeter that should be used to find the target for an
53 // event in the subtree rooted at this EventTarget. 53 // event in the subtree rooted at this EventTarget.
54 virtual EventTargeter* GetEventTargeter() = 0; 54 virtual EventTargeter* GetEventTargeter() = 0;
55 55
56 // Updates the states in |event| (e.g. location) to be suitable for |target|, 56 // Updates the states in |event| (e.g. location) to be suitable for |target|,
57 // so that |event| can be dispatched to |target|. 57 // so that |event| can be dispatched to |target|.
58 virtual void ConvertEventToTarget(EventTarget* target, 58 virtual void ConvertEventToTarget(EventTarget* target,
59 LocatedEvent* event); 59 LocatedEvent* event);
60 60
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 EventHandlerList pre_target_list_; 109 EventHandlerList pre_target_list_;
110 EventHandlerList post_target_list_; 110 EventHandlerList post_target_list_;
111 EventHandler* target_handler_; 111 EventHandler* target_handler_;
112 112
113 DISALLOW_COPY_AND_ASSIGN(EventTarget); 113 DISALLOW_COPY_AND_ASSIGN(EventTarget);
114 }; 114 };
115 115
116 } // namespace ui 116 } // namespace ui
117 117
118 #endif // UI_EVENTS_EVENT_TARGET_H_ 118 #endif // UI_EVENTS_EVENT_TARGET_H_
OLDNEW
« no previous file with comments | « ui/events/event_dispatcher_unittest.cc ('k') | ui/events/event_target_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698