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

Unified Diff: ui/views/corewm/window_modality_controller.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/views/corewm/window_modality_controller.h ('k') | ui/views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/window_modality_controller.cc
diff --git a/ui/views/corewm/window_modality_controller.cc b/ui/views/corewm/window_modality_controller.cc
index dd91a20bb8141574750ef9aaa9ba5f26b31c138e..c6b2a37b7b6d243c3bf1a8cb9497b23d305805c6 100644
--- a/ui/views/corewm/window_modality_controller.cc
+++ b/ui/views/corewm/window_modality_controller.cc
@@ -103,9 +103,10 @@ WindowModalityController::~WindowModalityController() {
////////////////////////////////////////////////////////////////////////////////
// WindowModalityController, aura::EventFilter implementation:
-ui::EventResult WindowModalityController::OnKeyEvent(ui::KeyEvent* event) {
+void WindowModalityController::OnKeyEvent(ui::KeyEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
- return GetModalTransient(target) ? ui::ER_CONSUMED : ui::ER_UNHANDLED;
+ if (GetModalTransient(target))
+ event->StopPropagation();
}
ui::EventResult WindowModalityController::OnMouseEvent(ui::MouseEvent* event) {
« no previous file with comments | « ui/views/corewm/window_modality_controller.h ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698