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

Side by Side Diff: ash/pointer_down_watcher_delegate_aura.h

Issue 2167643005: Revert of mus: Rename .*PointerWatcher.* to .*PointerDownWatcher.*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve conflicts 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/mus/shell_delegate_mus.cc ('k') | ash/pointer_down_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/ash_export.h"
6 #include "ash/common/pointer_down_watcher_delegate.h"
7 #include "base/macros.h"
8 #include "base/observer_list.h"
9 #include "ui/events/event_handler.h"
10
11 namespace gfx {
12 class Point;
13 }
14
15 namespace ui {
16 class LocatedEvent;
17 }
18
19 namespace views {
20 class Widget;
21 }
22
23 namespace ash {
24
25 // Support for PointerDownWatchers in non-mus ash, implemented with a pre-target
26 // EventHandler on the Shell.
27 class ASH_EXPORT PointerDownWatcherDelegateAura
28 : public PointerDownWatcherDelegate,
29 public ui::EventHandler {
30 public:
31 PointerDownWatcherDelegateAura();
32 ~PointerDownWatcherDelegateAura() override;
33
34 // PointerDownWatcherDelegate:
35 void AddPointerDownWatcher(views::PointerDownWatcher* watcher) override;
36 void RemovePointerDownWatcher(views::PointerDownWatcher* watcher) override;
37
38 // ui::EventHandler:
39 void OnMouseEvent(ui::MouseEvent* event) override;
40 void OnTouchEvent(ui::TouchEvent* event) override;
41
42 private:
43 gfx::Point GetLocationInScreen(const ui::LocatedEvent& event) const;
44 views::Widget* GetTargetWidget(const ui::LocatedEvent& event) const;
45
46 // Must be empty on destruction.
47 base::ObserverList<views::PointerDownWatcher, true> pointer_down_watchers_;
48
49 DISALLOW_COPY_AND_ASSIGN(PointerDownWatcherDelegateAura);
50 };
51
52 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/shell_delegate_mus.cc ('k') | ash/pointer_down_watcher_delegate_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698