Home | History | Annotate | Download | only in wm
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef ASH_WM_SYSTEM_GESTURE_EVENT_FILTER_H_
      6 #define ASH_WM_SYSTEM_GESTURE_EVENT_FILTER_H_
      7 
      8 #include "base/memory/scoped_ptr.h"
      9 #include "ui/events/event_handler.h"
     10 
     11 namespace ash {
     12 class LongPressAffordanceHandler;
     13 class OverviewGestureHandler;
     14 class ShelfGestureHandler;
     15 
     16 namespace test {
     17 class SystemGestureEventFilterTest;
     18 }
     19 
     20 // An event filter which handles system level gesture events.
     21 class SystemGestureEventFilter : public ui::EventHandler {
     22  public:
     23   SystemGestureEventFilter();
     24   virtual ~SystemGestureEventFilter();
     25 
     26   // Overridden from ui::EventHandler:
     27   virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
     28   virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
     29   virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE;
     30   virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
     31 
     32  private:
     33   friend class ash::test::SystemGestureEventFilterTest;
     34 
     35   scoped_ptr<LongPressAffordanceHandler> long_press_affordance_;
     36   scoped_ptr<OverviewGestureHandler> overview_gesture_handler_;
     37   scoped_ptr<ShelfGestureHandler> shelf_gesture_handler_;
     38 
     39   DISALLOW_COPY_AND_ASSIGN(SystemGestureEventFilter);
     40 };
     41 
     42 }  // namespace ash
     43 
     44 #endif  // ASH_WM_SYSTEM_GESTURE_EVENT_FILTER_H_
     45