blob: 19b540932f8c2b8fc062b3bbda1898787584176f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_
#define ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
namespace aura {
class Window;
} // namespace aura
namespace ui {
class GestureEvent;
} // namespace ui
namespace ash {
// This manages gestures on the shelf (e.g. launcher, status tray) that affects
// the shelf visibility.
class ShelfGestureHandler {
public:
ShelfGestureHandler();
virtual ~ShelfGestureHandler();
// Processes a gesture event and updates the status of the shelf when
// appropriate. Returns true of the gesture has been handled and it should not
// be processed any farther, false otherwise.
// The caller must provide the |event_target_window| because the caller has
// knowledge of the type of the |event.target()| whether it's a |views::View|
// or an |aura::Window|.
bool ProcessGestureEvent(const ui::GestureEvent& event,
const aura::Window* event_target_window);
private:
bool drag_in_progress_;
DISALLOW_COPY_AND_ASSIGN(ShelfGestureHandler);
};
} // namespace ash
#endif // ASH_WM_GESTURES_SHELF_GESTURE_HANDLER_H_
|