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

Unified Diff: ui/aura/shared/compound_event_filter.h

Issue 10827145: Convert Aura to use ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « ui/aura/root_window_unittest.cc ('k') | ui/aura/shared/compound_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/shared/compound_event_filter.h
===================================================================
--- ui/aura/shared/compound_event_filter.h (revision 150582)
+++ ui/aura/shared/compound_event_filter.h (working copy)
@@ -8,9 +8,16 @@
#include "base/compiler_specific.h"
#include "base/observer_list.h"
#include "ui/aura/aura_export.h"
-#include "ui/aura/event.h"
#include "ui/aura/event_filter.h"
+namespace ui {
+class GestureEventImpl;
+class KeyEvent;
+class LocatedEvent;
+class MouseEvent;
+class TouchEventImpl;
+}
+
namespace aura {
class CursorManager;
class RootWindow;
@@ -25,7 +32,7 @@
// consumed by any of those filters. If an event is consumed by a filter, the
// rest of the filter(s) and CompoundEventFilter will not see the consumed
// event.
-class AURA_EXPORT CompoundEventFilter : public aura::EventFilter {
+class AURA_EXPORT CompoundEventFilter : public EventFilter {
public:
CompoundEventFilter();
virtual ~CompoundEventFilter();
@@ -39,41 +46,40 @@
// Adds/removes additional event filters. This does not take ownership of
// the EventFilter.
- void AddFilter(aura::EventFilter* filter);
- void RemoveFilter(aura::EventFilter* filter);
+ void AddFilter(EventFilter* filter);
+ void RemoveFilter(EventFilter* filter);
size_t GetFilterCount() const;
// Overridden from EventFilter:
- virtual bool PreHandleKeyEvent(aura::Window* target,
- aura::KeyEvent* event) OVERRIDE;
- virtual bool PreHandleMouseEvent(aura::Window* target,
- aura::MouseEvent* event) OVERRIDE;
- virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target,
- aura::TouchEvent* event) OVERRIDE;
+ virtual bool PreHandleKeyEvent(Window* target, ui::KeyEvent* event) OVERRIDE;
+ virtual bool PreHandleMouseEvent(Window* target,
+ ui::MouseEvent* event) OVERRIDE;
+ virtual ui::TouchStatus PreHandleTouchEvent(
+ Window* target,
+ ui::TouchEventImpl* event) OVERRIDE;
virtual ui::GestureStatus PreHandleGestureEvent(
- aura::Window* target,
- aura::GestureEvent* event) OVERRIDE;
+ Window* target,
+ ui::GestureEventImpl* event) OVERRIDE;
private:
// Updates the cursor if the target provides a custom one, and provides
// default resize cursors for window edges.
- void UpdateCursor(aura::Window* target, aura::MouseEvent* event);
+ void UpdateCursor(Window* target, ui::MouseEvent* event);
// Dispatches event to additional filters. Returns false or
// ui::TOUCH_STATUS_UNKNOWN if event is consumed.
- bool FilterKeyEvent(aura::Window* target, aura::KeyEvent* event);
- bool FilterMouseEvent(aura::Window* target, aura::MouseEvent* event);
- ui::TouchStatus FilterTouchEvent(aura::Window* target,
- aura::TouchEvent* event);
+ bool FilterKeyEvent(Window* target, ui::KeyEvent* event);
+ bool FilterMouseEvent(Window* target, ui::MouseEvent* event);
+ ui::TouchStatus FilterTouchEvent(Window* target, ui::TouchEventImpl* event);
// Sets the visibility of the cursor if the event is not synthesized and
// |update_cursor_visibility_| is true.
void SetCursorVisibilityOnEvent(aura::Window* target,
- aura::LocatedEvent* event,
+ ui::LocatedEvent* event,
bool show);
// Additional event filters that pre-handles events.
- ObserverList<aura::EventFilter, true> filters_;
+ ObserverList<EventFilter, true> filters_;
// Should we show the mouse cursor when we see mouse movement and hide it when
// we see a touch event?
« no previous file with comments | « ui/aura/root_window_unittest.cc ('k') | ui/aura/shared/compound_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698