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

Unified Diff: ui/views/corewm/focus_controller_unittest.cc

Issue 11308322: events: Start changing EventHandler interface to not return a value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« ui/base/events/event.cc ('K') | « ui/views/corewm/focus_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/focus_controller_unittest.cc
diff --git a/ui/views/corewm/focus_controller_unittest.cc b/ui/views/corewm/focus_controller_unittest.cc
index ba7c4412a14a2efc55f24a9bc2faad2beec7a407..81159fefe2a4589a95ec91a3ebaaa463b00331bf 100644
--- a/ui/views/corewm/focus_controller_unittest.cc
+++ b/ui/views/corewm/focus_controller_unittest.cc
@@ -42,9 +42,12 @@ class FocusEventsTestHandler : public ui::EventHandler,
private:
// Overridden from ui::EventHandler:
- virtual ui::EventResult OnEvent(ui::Event* event) OVERRIDE {
+ virtual void OnEvent(ui::Event* event) OVERRIDE {
event_counts_[event->type()] += 1;
- return result_;
+ if (result_ & ui::ER_CONSUMED)
+ event->StopPropagation();
+ else if (result_ & ui::ER_HANDLED)
+ event->PreventDefault();
}
// Overridden from aura::WindowObserver:
« ui/base/events/event.cc ('K') | « ui/views/corewm/focus_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698