Only fsync leveldb's directory when the manifest is being updated.
[chromium-blink-merge.git] / ash / wm / gestures / two_finger_drag_handler.h
blob06cb86d940549f20b3972bb21fb4f6273f5fa18d
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.
5 #ifndef ASH_WM_GESTURES_TWO_FINGER_DRAG_HANDLER_H_
6 #define ASH_WM_GESTURES_TWO_FINGER_DRAG_HANDLER_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/aura/window_observer.h"
12 namespace aura {
13 class Window;
16 namespace ui {
17 class GestureEvent;
20 namespace ash {
22 class WindowResizer;
24 namespace internal {
26 // This handles 2-finger drag gestures to move toplevel windows.
27 class TwoFingerDragHandler : public aura::WindowObserver {
28 public:
29 TwoFingerDragHandler();
30 virtual ~TwoFingerDragHandler();
32 // Processes a gesture event and starts a drag, or updates/ends an in-progress
33 // drag. Returns true if the event has been handled and should not be
34 // processed any farther, false otherwise.
35 bool ProcessGestureEvent(aura::Window* target, const ui::GestureEvent& event);
37 private:
38 void Reset();
40 // Overridden from aura::WindowObserver.
41 virtual void OnWindowVisibilityChanged(aura::Window* window,
42 bool visible) OVERRIDE;
43 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
45 int first_finger_hittest_;
47 scoped_ptr<WindowResizer> window_resizer_;
49 DISALLOW_COPY_AND_ASSIGN(TwoFingerDragHandler);
53 } // namespace ash
55 #endif // ASH_WM_GESTURES_TWO_FINGER_DRAG_HANDLER_H_