OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 UI_VIEWS_EVENT_MONITOR_H_ |
| 6 #define UI_VIEWS_EVENT_MONITOR_H_ |
| 7 |
| 8 #include "ui/gfx/geometry/point.h" |
| 9 #include "ui/views/views_export.h" |
| 10 |
| 11 namespace ui { |
| 12 class EventHandler; |
| 13 } |
| 14 |
| 15 namespace views { |
| 16 |
| 17 // RAII-style class that forwards events posted to the application to |
| 18 // |event_handler| before they are dispatched. |
| 19 class VIEWS_EXPORT EventMonitor { |
| 20 public: |
| 21 virtual ~EventMonitor() {} |
| 22 |
| 23 static EventMonitor* Create(ui::EventHandler* event_handler); |
| 24 |
| 25 // Returns the last mouse location seen in a mouse event in screen |
| 26 // coordinates. |
| 27 static gfx::Point GetLastMouseLocation(); |
| 28 }; |
| 29 |
| 30 } // namespace views |
| 31 |
| 32 #endif // UI_VIEWS_EVENT_MONITOR_H_ |
OLD | NEW |