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

Side by Side Diff: ash/pointer_watcher_delegate_aura.h

Issue 1921673005: mus: Add PointerWatcher for passively observing mouse and touch events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ash_shell_with_content Created 4 years, 8 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 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/pointer_watcher_delegate.h"
7 #include "base/macros.h"
8 #include "base/observer_list.h"
9 #include "ui/events/event_handler.h"
10
11 namespace ash {
12
13 // Support for PointerWatchers in non-mus ash, implemented with a pre-target
14 // EventHandler on the Shell.
15 class ASH_EXPORT PointerWatcherDelegateAura : public PointerWatcherDelegate,
16 public ui::EventHandler {
17 public:
18 PointerWatcherDelegateAura();
19 ~PointerWatcherDelegateAura() override;
20
21 // PointerWatcherDelegate:
22 void AddPointerWatcher(views::PointerWatcher* watcher) override;
23 void RemovePointerWatcher(views::PointerWatcher* watcher) override;
24
25 // ui::EventHandler:
26 void OnMouseEvent(ui::MouseEvent* event) override;
27 void OnTouchEvent(ui::TouchEvent* event) override;
28
29 private:
30 // Must be empty on destruction.
31 base::ObserverList<views::PointerWatcher, true> pointer_watchers_;
32
33 DISALLOW_COPY_AND_ASSIGN(PointerWatcherDelegateAura);
34 };
35
36 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698