Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: views/touchui/gesture_manager.h

Issue 3192002: Added entry points to view/View to dispatch and process TouchEvents. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: final changes Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « views/event.h ('k') | views/touchui/gesture_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 VIEWS_TOUCHUI_GESTURE_MANAGER_H_
6 #define VIEWS_TOUCHUI_GESTURE_MANAGER_H_
7 #pragma once
8
9 #include "base/singleton.h"
10
11 namespace views {
12 class View;
13 class TouchEvent;
14
15
16 // A GestureManager singleton detects gestures occurring in the
17 // incoming feed of touch events across all of the RootViews in
18 // the system. In response to a given touch event, the GestureManager
19 // updates its internal state and optionally dispatches synthetic
20 // events to the invoking view.
21 //
22 class GestureManager {
23 public:
24 virtual ~GestureManager();
25
26 static GestureManager* Get();
27
28 // Invoked for each touch event that could contribute to the current gesture.
29 // Takes the event and the View that originated it and which will also
30 // be the target of any generated synthetic event. Finally, handled
31 // specifies if the event was actually handled explicitly by a view so that
32 // GestureManager state can correctly reflect events that are handled
33 // already.
34 // Returns true if the event resulted in firing a synthetic event.
35 virtual bool ProcessTouchEventForGesture(const TouchEvent& event,
36 View* source,
37 bool previouslyHandled);
38
39 // TODO(rjkroege): Write the remainder of this class.
40 // It will appear in a subsequent CL.
41
42 protected:
43 GestureManager();
44
45 private:
46 friend struct DefaultSingletonTraits<GestureManager>;
47
48 DISALLOW_COPY_AND_ASSIGN(GestureManager);
49 };
50
51
52 } // namespace views
53
54 #endif // VIEWS_TOUCHUI_GESTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « views/event.h ('k') | views/touchui/gesture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698