OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_ | 5 #ifndef ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_ |
6 #define ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_ | 6 #define ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class TrayEventFilter : public ui::EventHandler { | 23 class TrayEventFilter : public ui::EventHandler { |
24 public: | 24 public: |
25 explicit TrayEventFilter(); | 25 explicit TrayEventFilter(); |
26 virtual ~TrayEventFilter(); | 26 virtual ~TrayEventFilter(); |
27 | 27 |
28 void AddWrapper(TrayBubbleWrapper* wrapper); | 28 void AddWrapper(TrayBubbleWrapper* wrapper); |
29 void RemoveWrapper(TrayBubbleWrapper* wrapper); | 29 void RemoveWrapper(TrayBubbleWrapper* wrapper); |
30 | 30 |
31 // Overridden from ui::EventHandler. | 31 // Overridden from ui::EventHandler. |
32 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 32 virtual void OnMouseEvent(ui::MouseEvent* event) override; |
33 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 33 virtual void OnTouchEvent(ui::TouchEvent* event) override; |
34 | 34 |
35 private: | 35 private: |
36 // Returns true if the event is handled. | 36 // Returns true if the event is handled. |
37 bool ProcessLocatedEvent(ui::LocatedEvent* event); | 37 bool ProcessLocatedEvent(ui::LocatedEvent* event); |
38 | 38 |
39 std::set<TrayBubbleWrapper*> wrappers_; | 39 std::set<TrayBubbleWrapper*> wrappers_; |
40 | 40 |
41 DISALLOW_COPY_AND_ASSIGN(TrayEventFilter); | 41 DISALLOW_COPY_AND_ASSIGN(TrayEventFilter); |
42 }; | 42 }; |
43 | 43 |
44 } // namespace ash | 44 } // namespace ash |
45 | 45 |
46 #endif // ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_ | 46 #endif // ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_ |
OLD | NEW |