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

Unified Diff: ui/base/events/event_target.h

Issue 10916221: Make ToplevelWindowEventFilter and WorkspaceEventFilter into event handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/workspace_controller_test_helper.cc ('k') | ui/base/events/event_target.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/events/event_target.h
===================================================================
--- ui/base/events/event_target.h (revision 155914)
+++ ui/base/events/event_target.h (working copy)
@@ -17,6 +17,21 @@
public:
typedef std::vector<EventTarget*> EventTargets;
+ class TestApi {
+ public:
+ explicit TestApi(EventTarget* target) : target_(target) {}
+
+ const EventHandlerList& pre_target_handlers() {
+ return target_->pre_target_list_;
+ }
+
+ private:
+ TestApi();
+ EventTarget* target_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestApi);
+ };
+
EventTarget();
virtual ~EventTarget();
@@ -29,7 +44,7 @@
void AddPreTargetHandler(EventHandler* handler);
void RemovePreTargetHandler(EventHandler* handler);
- // Adds a handler to receive events after the target. The hanler must be
+ // Adds a handler to receive events after the target. The handler must be
// explicitly removed from the target before the handler is destroyed. The
// EventTarget does not take ownership of the handler.
void AddPostTargetHandler(EventHandler* handler);
@@ -40,9 +55,6 @@
target_handler_ = handler;
}
- EventHandlerList& pre_target_list() { return pre_target_list_; }
- EventHandlerList& post_target_list() { return post_target_list_; }
-
private:
friend class EventDispatcher;
« no previous file with comments | « ash/wm/workspace_controller_test_helper.cc ('k') | ui/base/events/event_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698