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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/event_filter.h ('k') | ui/aura/toplevel_window_event_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/event_filter.h" 5 #include "ui/aura/event_filter.h"
6 6
7 #include "ui/aura/event.h"
8 #include "ui/aura/focus_manager.h"
9 #include "ui/aura/window.h"
10
7 namespace aura { 11 namespace aura {
8 12
9 EventFilter::EventFilter(Window* owner) : owner_(owner) { 13 EventFilter::EventFilter(Window* owner) : owner_(owner) {
10 } 14 }
11 15
12 EventFilter::~EventFilter() { 16 EventFilter::~EventFilter() {
13 } 17 }
14 18
15 bool EventFilter::OnMouseEvent(Window* target, MouseEvent* event) { 19 bool EventFilter::OnMouseEvent(Window* target, MouseEvent* event) {
20 if (event->type() == ui::ET_MOUSE_PRESSED) {
21 // TODO(beng): some windows (e.g. disabled ones, tooltips, etc) may not be
22 // focusable.
23 target->GetFocusManager()->SetFocusedWindow(target);
24 }
16 return false; 25 return false;
17 } 26 }
18 27
19 } // namespace aura 28 } // namespace aura
OLDNEW
« 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