1 // Copyright 2013 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.
5 #ifndef ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_
6 #define ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_
8 #include "ash/wm/gestures/shelf_gesture_handler.h"
9 #include "ui/events/event_handler.h"
10 #include "ui/gfx/rect.h"
14 class ShelfLayoutManager;
16 // Detects and forwards touch gestures that occur on a bezel sensor to the
18 class ShelfBezelEventFilter : public ui::EventHandler {
20 explicit ShelfBezelEventFilter(ShelfLayoutManager* shelf);
21 virtual ~ShelfBezelEventFilter();
23 // Overridden from ui::EventHandler:
24 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
27 bool IsShelfOnBezel(const gfx::Rect& screen,
28 const gfx::Point& point) const;
30 ShelfLayoutManager* shelf_; // non-owned
32 ShelfGestureHandler gesture_handler_;
33 DISALLOW_COPY_AND_ASSIGN(ShelfBezelEventFilter);
36 } // namespace internal
39 #endif // ASH_SHELF_SHELF_BEZEL_EVENT_FILTER_H_