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

Side by Side Diff: ash/common/system/tray/tray_event_filter.h

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 9 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_
6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_
7
8 #include <set>
9
10 #include "base/macros.h"
11 #include "ui/views/pointer_watcher.h"
12
13 namespace gfx {
14 class Point;
15 }
16
17 namespace ui {
18 class PointerEvent;
19 }
20
21 namespace ash {
22 class TrayBubbleWrapper;
23
24 // Handles events for a tray bubble, e.g. to close the system tray bubble when
25 // the user clicks outside it.
26 class TrayEventFilter : public views::PointerWatcher {
27 public:
28 TrayEventFilter();
29 ~TrayEventFilter() override;
30
31 void AddWrapper(TrayBubbleWrapper* wrapper);
32 void RemoveWrapper(TrayBubbleWrapper* wrapper);
33
34 // views::PointerWatcher:
35 void OnPointerEventObserved(const ui::PointerEvent& event,
36 const gfx::Point& location_in_screen,
37 views::Widget* target) override;
38
39 private:
40 void ProcessPressedEvent(const gfx::Point& location_in_screen,
41 views::Widget* target);
42
43 std::set<TrayBubbleWrapper*> wrappers_;
44
45 DISALLOW_COPY_AND_ASSIGN(TrayEventFilter);
46 };
47
48 } // namespace ash
49
50 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_details_view_unittest.cc ('k') | ash/common/system/tray/tray_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698