Explicitly add python-numpy dependency to install-build-deps.
[chromium-blink-merge.git] / ui / views / event_monitor_aura.cc
blob3b8f49ae899ad0ea8ebbeed112a86bcd785d326f
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"
10 namespace views {
12 // static
13 EventMonitor* EventMonitor::Create(ui::EventHandler* event_handler) {
14 return new EventMonitorAura(event_handler);
17 // static
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_);
32 } // namespace views