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

Unified Diff: ui/aura/env.h

Issue 10960015: aura: Start converting event-filters into event-handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leak 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/shell.cc ('k') | ui/aura/env.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/env.h
diff --git a/ui/aura/env.h b/ui/aura/env.h
index 394bf34fe303c79d022c50be01846e6519f1a23c..ca2a183a588c3e3e7722d49b6436935ebccc458c 100644
--- a/ui/aura/env.h
+++ b/ui/aura/env.h
@@ -10,6 +10,7 @@
#include "base/observer_list.h"
#include "ui/aura/aura_export.h"
#include "ui/aura/client/stacking_client.h"
+#include "ui/base/events/event_handler.h"
#include "ui/gfx/point.h"
#if defined(USE_X11)
@@ -80,9 +81,15 @@ class AURA_EXPORT Env {
DisplayManager* display_manager() { return display_manager_.get(); }
void SetDisplayManager(DisplayManager* display_manager);
- // Env takes ownership of the EventFilter.
- EventFilter* event_filter() { return event_filter_.get(); }
- void SetEventFilter(EventFilter* event_filter);
+ // Add event handler for pre-target of post-target phases.
+ void AddPreTargetEventHandler(ui::EventHandler* handler);
Ben Goodger (Google) 2012/09/20 21:29:48 qq: could Env be an EventTarget with a NULL target
sadrul 2012/09/20 22:33:31 Oh, very interesting. I made this change (RootWind
+ void RemovePreTargetEventHandler(ui::EventHandler* handler);
+ void AddPostTargetEventHandler(ui::EventHandler* handler);
+ void RemovePostTargetEventHandler(ui::EventHandler* handler);
+
+ const ui::EventHandlerList& pre_target_handlers() const {
+ return pre_target_handlers_;
+ }
// Returns the native event dispatcher. The result should only be passed to
// base::RunLoop(dispatcher), or used to dispatch an event by
@@ -115,7 +122,9 @@ class AURA_EXPORT Env {
bool render_white_bg_;
client::StackingClient* stacking_client_;
scoped_ptr<DisplayManager> display_manager_;
- scoped_ptr<EventFilter> event_filter_;
+
+ ui::EventHandlerList pre_target_handlers_;
+ ui::EventHandlerList post_target_handlers_;
#if defined(USE_X11)
scoped_ptr<internal::DisplayChangeObserverX11> display_change_observer_;
« no previous file with comments | « ash/shell.cc ('k') | ui/aura/env.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698