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

Side by Side Diff: ui/views/event_monitor.h

Issue 730833006: MacViews: Implement event monitoring for a specific window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 UI_VIEWS_EVENT_MONITOR_H_ 5 #ifndef UI_VIEWS_EVENT_MONITOR_H_
6 #define UI_VIEWS_EVENT_MONITOR_H_ 6 #define UI_VIEWS_EVENT_MONITOR_H_
7 7
8 #include "ui/gfx/geometry/point.h" 8 #include "ui/gfx/geometry/point.h"
9 #include "ui/gfx/native_widget_types.h"
9 #include "ui/views/views_export.h" 10 #include "ui/views/views_export.h"
10 11
11 namespace ui { 12 namespace ui {
12 class EventHandler; 13 class EventHandler;
13 } 14 }
14 15
15 namespace views { 16 namespace views {
16 17
17 // RAII-style class that forwards events posted to the application to 18 // RAII-style class that forwards events posted to the application to
18 // |event_handler| before they are dispatched. 19 // |event_handler| before they are dispatched.
19 class VIEWS_EXPORT EventMonitor { 20 class VIEWS_EXPORT EventMonitor {
20 public: 21 public:
21 virtual ~EventMonitor() {} 22 virtual ~EventMonitor() {}
22 23
23 static EventMonitor* Create(ui::EventHandler* event_handler); 24 static EventMonitor* Create(ui::EventHandler* event_handler);
25 static EventMonitor* Create(ui::EventHandler* event_handler,
26 gfx::NativeWindow target_window);
24 27
25 // Returns the last mouse location seen in a mouse event in screen 28 // Returns the last mouse location seen in a mouse event in screen
26 // coordinates. 29 // coordinates.
27 static gfx::Point GetLastMouseLocation(); 30 static gfx::Point GetLastMouseLocation();
28 }; 31 };
29 32
30 } // namespace views 33 } // namespace views
31 34
32 #endif // UI_VIEWS_EVENT_MONITOR_H_ 35 #endif // UI_VIEWS_EVENT_MONITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698