| OLD | NEW |
| 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 #ifndef ASH_AURA_POINTER_WATCHER_ADAPTER_H_ | 5 #ifndef ASH_AURA_POINTER_WATCHER_ADAPTER_H_ |
| 6 #define ASH_AURA_POINTER_WATCHER_ADAPTER_H_ | 6 #define ASH_AURA_POINTER_WATCHER_ADAPTER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 namespace ash { | 28 namespace ash { |
| 29 | 29 |
| 30 // Support for PointerWatchers in non-mus ash, implemented with a pre-target | 30 // Support for PointerWatchers in non-mus ash, implemented with a pre-target |
| 31 // EventHandler on the Shell. | 31 // EventHandler on the Shell. |
| 32 class ASH_EXPORT PointerWatcherAdapter : public ui::EventHandler { | 32 class ASH_EXPORT PointerWatcherAdapter : public ui::EventHandler { |
| 33 public: | 33 public: |
| 34 PointerWatcherAdapter(); | 34 PointerWatcherAdapter(); |
| 35 ~PointerWatcherAdapter() override; | 35 ~PointerWatcherAdapter() override; |
| 36 | 36 |
| 37 // See WmShell::AddPointerWatcher() for details. | 37 // See ShellPort::AddPointerWatcher() for details. |
| 38 void AddPointerWatcher(views::PointerWatcher* watcher, | 38 void AddPointerWatcher(views::PointerWatcher* watcher, |
| 39 views::PointerWatcherEventTypes events); | 39 views::PointerWatcherEventTypes events); |
| 40 void RemovePointerWatcher(views::PointerWatcher* watcher); | 40 void RemovePointerWatcher(views::PointerWatcher* watcher); |
| 41 | 41 |
| 42 // ui::EventHandler: | 42 // ui::EventHandler: |
| 43 void OnMouseEvent(ui::MouseEvent* event) override; | 43 void OnMouseEvent(ui::MouseEvent* event) override; |
| 44 void OnTouchEvent(ui::TouchEvent* event) override; | 44 void OnTouchEvent(ui::TouchEvent* event) override; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 gfx::Point GetLocationInScreen(const ui::LocatedEvent& event) const; | 47 gfx::Point GetLocationInScreen(const ui::LocatedEvent& event) const; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 61 base::ObserverList<views::PointerWatcher, true> non_move_watchers_; | 61 base::ObserverList<views::PointerWatcher, true> non_move_watchers_; |
| 62 base::ObserverList<views::PointerWatcher, true> move_watchers_; | 62 base::ObserverList<views::PointerWatcher, true> move_watchers_; |
| 63 base::ObserverList<views::PointerWatcher, true> drag_watchers_; | 63 base::ObserverList<views::PointerWatcher, true> drag_watchers_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(PointerWatcherAdapter); | 65 DISALLOW_COPY_AND_ASSIGN(PointerWatcherAdapter); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace ash | 68 } // namespace ash |
| 69 | 69 |
| 70 #endif // ASH_AURA_POINTER_WATCHER_ADAPTER_H_ | 70 #endif // ASH_AURA_POINTER_WATCHER_ADAPTER_H_ |
| OLD | NEW |