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

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

Issue 2099603002: Reland: mash: Convert TrayBackgroundView to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix conflict Created 4 years, 5 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
« no previous file with comments | « ash/system/tray/tray_bubble_wrapper.cc ('k') | ash/system/tray/tray_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
(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_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_
6 #define ASH_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 LocatedEvent;
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 OnMousePressed(const ui::MouseEvent& event,
36 const gfx::Point& location_in_screen,
37 views::Widget* target) override;
38 void OnTouchPressed(const ui::TouchEvent& event,
39 const gfx::Point& location_in_screen,
40 views::Widget* target) override;
41
42 private:
43 void ProcessPressedEvent(const gfx::Point& location_in_screen,
44 views::Widget* target);
45
46 std::set<TrayBubbleWrapper*> wrappers_;
47
48 DISALLOW_COPY_AND_ASSIGN(TrayEventFilter);
49 };
50
51 } // namespace ash
52
53 #endif // ASH_SYSTEM_TRAY_TRAY_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « ash/system/tray/tray_bubble_wrapper.cc ('k') | ash/system/tray/tray_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698