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

Side by Side Diff: ui/views/event_monitor_aura.cc

Issue 678823002: MacViews: Create abstraction for event monitoring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views-tabs
Patch Set: Rebase 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
« no previous file with comments | « ui/views/event_monitor_aura.h ('k') | ui/views/event_monitor_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #include "ui/views/event_monitor_aura.h"
6
7 #include "base/logging.h"
8 #include "ui/aura/env.h"
9
10 namespace views {
11
12 // static
13 EventMonitor* EventMonitor::Create(ui::EventHandler* event_handler) {
14 return new EventMonitorAura(event_handler);
15 }
16
17 // static
18 gfx::Point EventMonitor::GetLastMouseLocation() {
19 return aura::Env::GetInstance()->last_mouse_location();
20 }
21
22 EventMonitorAura::EventMonitorAura(ui::EventHandler* event_handler)
23 : event_handler_(event_handler) {
24 DCHECK(event_handler_);
25 aura::Env::GetInstance()->AddPreTargetHandler(event_handler_);
26 }
27
28 EventMonitorAura::~EventMonitorAura() {
29 aura::Env::GetInstance()->RemovePreTargetHandler(event_handler_);
30 }
31
32 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/event_monitor_aura.h ('k') | ui/views/event_monitor_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698