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

Unified Diff: ui/aura/test/test_window_delegate.cc

Issue 11570012: events: Update key-event handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-for-landing 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/test/test_window_delegate.h ('k') | ui/base/events/event_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/test_window_delegate.cc
diff --git a/ui/aura/test/test_window_delegate.cc b/ui/aura/test/test_window_delegate.cc
index eb3456160f5bfe627150583a329e0c77d9740a14..155e343e9d5648c553f280b69341a42d9d87836f 100644
--- a/ui/aura/test/test_window_delegate.cc
+++ b/ui/aura/test/test_window_delegate.cc
@@ -102,16 +102,19 @@ ColorTestWindowDelegate::ColorTestWindowDelegate(SkColor color)
: color_(color),
last_key_code_(ui::VKEY_UNKNOWN) {
}
+
ColorTestWindowDelegate::~ColorTestWindowDelegate() {
}
-ui::EventResult ColorTestWindowDelegate::OnKeyEvent(ui::KeyEvent* event) {
+void ColorTestWindowDelegate::OnKeyEvent(ui::KeyEvent* event) {
last_key_code_ = event->key_code();
- return ui::ER_HANDLED;
+ event->SetHandled();
}
+
void ColorTestWindowDelegate::OnWindowDestroyed() {
delete this;
}
+
void ColorTestWindowDelegate::OnPaint(gfx::Canvas* canvas) {
canvas->DrawColor(color_, SkXfermode::kSrc_Mode);
}
@@ -144,7 +147,7 @@ EventCountDelegate::EventCountDelegate()
key_release_count_(0) {
}
-ui::EventResult EventCountDelegate::OnKeyEvent(ui::KeyEvent* event) {
+void EventCountDelegate::OnKeyEvent(ui::KeyEvent* event) {
switch (event->type()) {
case ui::ET_KEY_PRESSED:
key_press_count_++;
@@ -154,7 +157,6 @@ ui::EventResult EventCountDelegate::OnKeyEvent(ui::KeyEvent* event) {
default:
break;
}
- return ui::ER_UNHANDLED;
}
ui::EventResult EventCountDelegate::OnMouseEvent(ui::MouseEvent* event) {
« no previous file with comments | « ui/aura/test/test_window_delegate.h ('k') | ui/base/events/event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698