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

Side by Side Diff: ui/aura/event_filter.h

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/desktop.cc ('k') | ui/aura/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 #ifndef UI_AURA_EVENT_FILTER_H_ 5 #ifndef UI_AURA_EVENT_FILTER_H_
6 #define UI_AURA_EVENT_FILTER_H_ 6 #define UI_AURA_EVENT_FILTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/gfx/point.h" 10 #include "ui/gfx/point.h"
11 11
12 namespace aura { 12 namespace aura {
13 13
14 class Window; 14 class Window;
15 class MouseEvent; 15 class MouseEvent;
16 16
17 // An object that filters events sent to an owner window, potentially performing 17 // An object that filters events sent to an owner window, potentially performing
18 // adjustments to the window's position, size and z-index. 18 // adjustments to the window's position, size and z-index.
19 class EventFilter { 19 class EventFilter {
20 public: 20 public:
21 explicit EventFilter(Window* owner); 21 explicit EventFilter(Window* owner);
22 virtual ~EventFilter(); 22 virtual ~EventFilter();
23 23
24 // Try to handle |event| (before the owner's delegate gets a chance to). 24 // Try to handle |event| (before the owner's delegate gets a chance to).
25 // Returns true if the event was handled by the WindowManager and should not 25 // Returns true if the event was handled by the WindowManager and should not
26 // be forwarded to the owner's delegate. 26 // be forwarded to the owner's delegate.
27 // Default implementation for ET_MOUSE_PRESSED focuses the window.
27 virtual bool OnMouseEvent(Window* target, MouseEvent* event); 28 virtual bool OnMouseEvent(Window* target, MouseEvent* event);
28 29
29 protected: 30 protected:
30 Window* owner() { return owner_; } 31 Window* owner() { return owner_; }
31 32
32 private: 33 private:
33 Window* owner_; 34 Window* owner_;
34 35
35 DISALLOW_COPY_AND_ASSIGN(EventFilter); 36 DISALLOW_COPY_AND_ASSIGN(EventFilter);
36 }; 37 };
37 38
38 } // namespace aura 39 } // namespace aura
39 40
40 #endif // UI_AURA_EVENT_FILTER_H_ 41 #endif // UI_AURA_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « ui/aura/desktop.cc ('k') | ui/aura/event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698