OLD | NEW |
1 // Copyright (c) 2012 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 #include "ui/aura/shared/compound_event_filter.h" | 5 #include "ui/aura/shared/compound_event_filter.h" |
6 | 6 |
7 #include "ui/aura/client/activation_client.h" | 7 #include "ui/aura/client/activation_client.h" |
8 #include "ui/aura/client/cursor_client.h" | 8 #include "ui/aura/client/cursor_client.h" |
9 #include "ui/aura/env.h" | 9 #include "ui/aura/env.h" |
10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Overridden from EventFilter. | 65 // Overridden from EventFilter. |
66 virtual bool PreHandleKeyEvent(Window* target, ui::KeyEvent* event) OVERRIDE { | 66 virtual bool PreHandleKeyEvent(Window* target, ui::KeyEvent* event) OVERRIDE { |
67 return false; | 67 return false; |
68 } | 68 } |
69 | 69 |
70 virtual bool PreHandleMouseEvent(Window* target, | 70 virtual bool PreHandleMouseEvent(Window* target, |
71 ui::MouseEvent* event) OVERRIDE { | 71 ui::MouseEvent* event) OVERRIDE { |
72 return false; | 72 return false; |
73 } | 73 } |
74 | 74 |
75 virtual ui::TouchStatus PreHandleTouchEvent( | 75 virtual ui::EventResult PreHandleTouchEvent( |
76 Window* target, | 76 Window* target, |
77 ui::TouchEvent* event) OVERRIDE { | 77 ui::TouchEvent* event) OVERRIDE { |
78 return ui::TOUCH_STATUS_UNKNOWN; | 78 return ui::ER_UNHANDLED; |
79 } | 79 } |
80 | 80 |
81 virtual ui::EventResult PreHandleGestureEvent( | 81 virtual ui::EventResult PreHandleGestureEvent( |
82 Window* target, | 82 Window* target, |
83 ui::GestureEvent* event) OVERRIDE { | 83 ui::GestureEvent* event) OVERRIDE { |
84 return ui::ER_CONSUMED; | 84 return ui::ER_CONSUMED; |
85 } | 85 } |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(ConsumeGestureEventFilter); | 87 DISALLOW_COPY_AND_ASSIGN(ConsumeGestureEventFilter); |
88 }; | 88 }; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 EventGenerator generator(root_window(), gfx::Point(50, 50)); | 184 EventGenerator generator(root_window(), gfx::Point(50, 50)); |
185 generator.PressTouch(); | 185 generator.PressTouch(); |
186 EXPECT_FALSE(window->HasFocus()); | 186 EXPECT_FALSE(window->HasFocus()); |
187 | 187 |
188 compound_filter->RemoveFilter(gesture_filter.get()); | 188 compound_filter->RemoveFilter(gesture_filter.get()); |
189 aura::Env::GetInstance()->AddPreTargetHandler(compound_filter.get()); | 189 aura::Env::GetInstance()->AddPreTargetHandler(compound_filter.get()); |
190 } | 190 } |
191 | 191 |
192 } // namespace test | 192 } // namespace test |
193 } // namespace aura | 193 } // namespace aura |
OLD | NEW |