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.
5 #include "ui/views/event_monitor_aura.h"
7 #include "base/logging.h"
8 #include "ui/aura/env.h"
13 EventMonitor
* EventMonitor::Create(ui::EventHandler
* event_handler
) {
14 return new EventMonitorAura(event_handler
);
18 gfx::Point
EventMonitor::GetLastMouseLocation() {
19 return aura::Env::GetInstance()->last_mouse_location();
22 EventMonitorAura::EventMonitorAura(ui::EventHandler
* event_handler
)
23 : event_handler_(event_handler
) {
24 DCHECK(event_handler_
);
25 aura::Env::GetInstance()->AddPreTargetHandler(event_handler_
);
28 EventMonitorAura::~EventMonitorAura() {
29 aura::Env::GetInstance()->RemovePreTargetHandler(event_handler_
);