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

Unified Diff: ui/aura/root_window_unittest.cc

Issue 11592011: events: Update mouse-event handlers to not return EventResult. (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
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/test/test_event_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_unittest.cc
diff --git a/ui/aura/root_window_unittest.cc b/ui/aura/root_window_unittest.cc
index 9f97cb707c6d70e50fb9b4a7f9618cd8cab8422f..a7298e955c49dd2c8ffb719e2f382a9f0f6cc1d6 100644
--- a/ui/aura/root_window_unittest.cc
+++ b/ui/aura/root_window_unittest.cc
@@ -57,11 +57,11 @@ class NonClientDelegate : public test::TestWindowDelegate {
self->non_client_location_ = location;
return HTTOPLEFT;
}
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
mouse_event_count_++;
mouse_event_location_ = event->location();
mouse_event_flags_ = event->flags();
- return ui::ER_HANDLED;
+ event->SetHandled();
}
private:
@@ -445,9 +445,8 @@ class EventFilterRecorder : public ui::EventHandler {
events_.push_back(event->type());
}
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
events_.push_back(event->type());
- return ui::ER_UNHANDLED;
}
virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE {
@@ -644,10 +643,9 @@ class DeletingEventFilter : public ui::EventHandler {
delete event->target();
}
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
if (delete_during_pre_handle_)
delete event->target();
- return ui::ER_UNHANDLED;
}
bool delete_during_pre_handle_;
@@ -678,11 +676,10 @@ class DeletingWindowDelegate : public test::TestWindowDelegate {
got_event_ = true;
}
- virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
+ virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
if (delete_during_handle_)
delete window_;
got_event_ = true;
- return ui::ER_UNHANDLED;
}
Window* window_;
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/test/test_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698