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 <memory> 9 10 #include "base/macros.h" 11 #include "ui/events/event_handler.h" 12 13 namespace ash { 14 class WmGestureHandler; 15 16 // An event filter which handles system level gesture events. 17 class SystemGestureEventFilter : public ui::EventHandler { 18 public: 19 SystemGestureEventFilter(); 20 ~SystemGestureEventFilter() override; 21 22 // Overridden from ui::EventHandler: 23 void OnMouseEvent(ui::MouseEvent* event) override; 24 void OnScrollEvent(ui::ScrollEvent* event) override; 25 26 private: 27 friend class SystemGestureEventFilterTest; 28 29 std::unique_ptr<WmGestureHandler> wm_gesture_handler_; 30 31 DISALLOW_COPY_AND_ASSIGN(SystemGestureEventFilter); 32 }; 33 34 } // namespace ash 35 36 #endif // ASH_WM_SYSTEM_GESTURE_EVENT_FILTER_H_ 37