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

Unified Diff: ui/aura/event_filter.cc

Issue 7980023: Fixes aura unit tests. There were a couple of problems: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months 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/event_filter.h ('k') | ui/aura/toplevel_window_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/event_filter.cc
diff --git a/ui/aura/event_filter.cc b/ui/aura/event_filter.cc
index 68748fbe3dafdec09654e804d12ee94651a1cae6..41436b3c1c090ff00d9aea8d40fa98e436f32f19 100644
--- a/ui/aura/event_filter.cc
+++ b/ui/aura/event_filter.cc
@@ -4,6 +4,10 @@
#include "ui/aura/event_filter.h"
+#include "ui/aura/event.h"
+#include "ui/aura/focus_manager.h"
+#include "ui/aura/window.h"
+
namespace aura {
EventFilter::EventFilter(Window* owner) : owner_(owner) {
@@ -13,6 +17,11 @@ EventFilter::~EventFilter() {
}
bool EventFilter::OnMouseEvent(Window* target, MouseEvent* event) {
+ if (event->type() == ui::ET_MOUSE_PRESSED) {
+ // TODO(beng): some windows (e.g. disabled ones, tooltips, etc) may not be
+ // focusable.
+ target->GetFocusManager()->SetFocusedWindow(target);
+ }
return false;
}
« no previous file with comments | « ui/aura/event_filter.h ('k') | ui/aura/toplevel_window_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698