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

Side by Side Diff: ui/aura/shared/compound_event_filter_unittest.cc

Issue 11364062: ui: Remove TouchStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
OLDNEW
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // Overridden from EventFilter. 66 // Overridden from EventFilter.
67 virtual bool PreHandleKeyEvent(Window* target, ui::KeyEvent* event) OVERRIDE { 67 virtual bool PreHandleKeyEvent(Window* target, ui::KeyEvent* event) OVERRIDE {
68 return false; 68 return false;
69 } 69 }
70 70
71 virtual bool PreHandleMouseEvent(Window* target, 71 virtual bool PreHandleMouseEvent(Window* target,
72 ui::MouseEvent* event) OVERRIDE { 72 ui::MouseEvent* event) OVERRIDE {
73 return false; 73 return false;
74 } 74 }
75 75
76 virtual ui::TouchStatus PreHandleTouchEvent( 76 virtual ui::EventResult PreHandleTouchEvent(
77 Window* target, 77 Window* target,
78 ui::TouchEvent* event) OVERRIDE { 78 ui::TouchEvent* event) OVERRIDE {
79 return ui::TOUCH_STATUS_UNKNOWN; 79 return ui::ER_UNHANDLED;
80 } 80 }
81 81
82 virtual ui::EventResult PreHandleGestureEvent( 82 virtual ui::EventResult PreHandleGestureEvent(
83 Window* target, 83 Window* target,
84 ui::GestureEvent* event) OVERRIDE { 84 ui::GestureEvent* event) OVERRIDE {
85 return ui::ER_CONSUMED; 85 return ui::ER_CONSUMED;
86 } 86 }
87 87
88 DISALLOW_COPY_AND_ASSIGN(ConsumeGestureEventFilter); 88 DISALLOW_COPY_AND_ASSIGN(ConsumeGestureEventFilter);
89 }; 89 };
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 EventGenerator generator(root_window(), gfx::Point(50, 50)); 185 EventGenerator generator(root_window(), gfx::Point(50, 50));
186 generator.PressTouch(); 186 generator.PressTouch();
187 EXPECT_FALSE(window->HasFocus()); 187 EXPECT_FALSE(window->HasFocus());
188 188
189 compound_filter->RemoveFilter(gesture_filter.get()); 189 compound_filter->RemoveFilter(gesture_filter.get());
190 aura::Env::GetInstance()->AddPreTargetHandler(compound_filter.get()); 190 aura::Env::GetInstance()->AddPreTargetHandler(compound_filter.get());
191 } 191 }
192 192
193 } // namespace test 193 } // namespace test
194 } // namespace aura 194 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698