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

Side by Side Diff: ash/pointer_watcher_delegate_aura.h

Issue 1934123004: mash: Fix shelf overflow bubble not closing on click outside its bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2openoverflow
Patch Set: rebase Created 4 years, 7 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 | « no previous file | ash/pointer_watcher_delegate_aura.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/ash_export.h" 5 #include "ash/ash_export.h"
6 #include "ash/pointer_watcher_delegate.h" 6 #include "ash/pointer_watcher_delegate.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "ui/events/event_handler.h" 9 #include "ui/events/event_handler.h"
10 10
11 namespace gfx {
12 class Point;
13 }
14
15 namespace ui {
16 class LocatedEvent;
17 }
18
11 namespace ash { 19 namespace ash {
12 20
13 // Support for PointerWatchers in non-mus ash, implemented with a pre-target 21 // Support for PointerWatchers in non-mus ash, implemented with a pre-target
14 // EventHandler on the Shell. 22 // EventHandler on the Shell.
15 class ASH_EXPORT PointerWatcherDelegateAura : public PointerWatcherDelegate, 23 class ASH_EXPORT PointerWatcherDelegateAura : public PointerWatcherDelegate,
16 public ui::EventHandler { 24 public ui::EventHandler {
17 public: 25 public:
18 PointerWatcherDelegateAura(); 26 PointerWatcherDelegateAura();
19 ~PointerWatcherDelegateAura() override; 27 ~PointerWatcherDelegateAura() override;
20 28
21 // PointerWatcherDelegate: 29 // PointerWatcherDelegate:
22 void AddPointerWatcher(views::PointerWatcher* watcher) override; 30 void AddPointerWatcher(views::PointerWatcher* watcher) override;
23 void RemovePointerWatcher(views::PointerWatcher* watcher) override; 31 void RemovePointerWatcher(views::PointerWatcher* watcher) override;
24 32
25 // ui::EventHandler: 33 // ui::EventHandler:
26 void OnMouseEvent(ui::MouseEvent* event) override; 34 void OnMouseEvent(ui::MouseEvent* event) override;
27 void OnTouchEvent(ui::TouchEvent* event) override; 35 void OnTouchEvent(ui::TouchEvent* event) override;
28 36
29 private: 37 private:
38 gfx::Point GetLocationInScreen(const ui::LocatedEvent& event) const;
39
30 // Must be empty on destruction. 40 // Must be empty on destruction.
31 base::ObserverList<views::PointerWatcher, true> pointer_watchers_; 41 base::ObserverList<views::PointerWatcher, true> pointer_watchers_;
32 42
33 DISALLOW_COPY_AND_ASSIGN(PointerWatcherDelegateAura); 43 DISALLOW_COPY_AND_ASSIGN(PointerWatcherDelegateAura);
34 }; 44 };
35 45
36 } // namespace ash 46 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/pointer_watcher_delegate_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698