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

Side by Side Diff: ui/aura/event_filter.h

Issue 9221014: aura: Gesture event plumbing (skeleton). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/event.h ('k') | ui/aura/event_filter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_AURA_EVENT_FILTER_H_ 5 #ifndef UI_AURA_EVENT_FILTER_H_
6 #define UI_AURA_EVENT_FILTER_H_ 6 #define UI_AURA_EVENT_FILTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/aura/aura_export.h" 10 #include "ui/aura/aura_export.h"
11 #include "ui/base/events.h" 11 #include "ui/base/events.h"
12 12
13 namespace aura { 13 namespace aura {
14 14
15 class GestureEvent;
15 class KeyEvent; 16 class KeyEvent;
16 class MouseEvent; 17 class MouseEvent;
17 class TouchEvent; 18 class TouchEvent;
18 class Window; 19 class Window;
19 20
20 // An object that filters events sent to an owner window. The filter can stop 21 // An object that filters events sent to an owner window. The filter can stop
21 // further processing of events. 22 // further processing of events.
22 // 23 //
23 // When the Desktop receives an event, it determines the "target window" for 24 // When the Desktop receives an event, it determines the "target window" for
24 // the event, this is typically the visible window whose bounds most tightly 25 // the event, this is typically the visible window whose bounds most tightly
(...skipping 21 matching lines...) Expand all
46 // that further processing can occur. 47 // that further processing can occur.
47 48
48 virtual bool PreHandleKeyEvent(Window* target, KeyEvent* event) = 0; 49 virtual bool PreHandleKeyEvent(Window* target, KeyEvent* event) = 0;
49 virtual bool PreHandleMouseEvent(Window* target, MouseEvent* event) = 0; 50 virtual bool PreHandleMouseEvent(Window* target, MouseEvent* event) = 0;
50 51
51 // Returns a value other than ui::TOUCH_STATUS_UNKNOWN if the event is 52 // Returns a value other than ui::TOUCH_STATUS_UNKNOWN if the event is
52 // consumed. 53 // consumed.
53 virtual ui::TouchStatus PreHandleTouchEvent(Window* target, 54 virtual ui::TouchStatus PreHandleTouchEvent(Window* target,
54 TouchEvent* event) = 0; 55 TouchEvent* event) = 0;
55 56
57 // Returns a value other than ui::GESTURE_STATUS_UNKNOWN if the gesture is
58 // consumed.
59 virtual ui::GestureStatus PreHandleGestureEvent(Window* target,
60 GestureEvent* event) = 0;
61
56 protected: 62 protected:
57 Window* owner() { return owner_; } 63 Window* owner() { return owner_; }
58 64
59 private: 65 private:
60 Window* owner_; 66 Window* owner_;
61 67
62 DISALLOW_COPY_AND_ASSIGN(EventFilter); 68 DISALLOW_COPY_AND_ASSIGN(EventFilter);
63 }; 69 };
64 70
65 } // namespace aura 71 } // namespace aura
66 72
67 #endif // UI_AURA_EVENT_FILTER_H_ 73 #endif // UI_AURA_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « ui/aura/event.h ('k') | ui/aura/event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698