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

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

Issue 819943002: Standardize usage of virtual/override/final specifiers in ui/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 months 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 #include "ui/views/mouse_watcher.h" 5 #include "ui/views/mouse_watcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/event_types.h" 9 #include "base/event_types.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 12 matching lines...) Expand all
23 23
24 class MouseWatcher::Observer : public ui::EventHandler { 24 class MouseWatcher::Observer : public ui::EventHandler {
25 public: 25 public:
26 explicit Observer(MouseWatcher* mouse_watcher) 26 explicit Observer(MouseWatcher* mouse_watcher)
27 : mouse_watcher_(mouse_watcher), 27 : mouse_watcher_(mouse_watcher),
28 event_monitor_(EventMonitor::CreateApplicationMonitor(this)), 28 event_monitor_(EventMonitor::CreateApplicationMonitor(this)),
29 notify_listener_factory_(this) { 29 notify_listener_factory_(this) {
30 } 30 }
31 31
32 // ui::EventHandler implementation: 32 // ui::EventHandler implementation:
33 virtual void OnMouseEvent(ui::MouseEvent* event) override { 33 void OnMouseEvent(ui::MouseEvent* event) override {
34 switch (event->type()) { 34 switch (event->type()) {
35 case ui::ET_MOUSE_MOVED: 35 case ui::ET_MOUSE_MOVED:
36 case ui::ET_MOUSE_DRAGGED: 36 case ui::ET_MOUSE_DRAGGED:
37 HandleMouseEvent(MouseWatcherHost::MOUSE_MOVE); 37 HandleMouseEvent(MouseWatcherHost::MOUSE_MOVE);
38 break; 38 break;
39 case ui::ET_MOUSE_EXITED: 39 case ui::ET_MOUSE_EXITED:
40 HandleMouseEvent(MouseWatcherHost::MOUSE_EXIT); 40 HandleMouseEvent(MouseWatcherHost::MOUSE_EXIT);
41 break; 41 break;
42 case ui::ET_MOUSE_PRESSED: 42 case ui::ET_MOUSE_PRESSED:
43 HandleMouseEvent(MouseWatcherHost::MOUSE_PRESS); 43 HandleMouseEvent(MouseWatcherHost::MOUSE_PRESS);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void MouseWatcher::Stop() { 115 void MouseWatcher::Stop() {
116 observer_.reset(NULL); 116 observer_.reset(NULL);
117 } 117 }
118 118
119 void MouseWatcher::NotifyListener() { 119 void MouseWatcher::NotifyListener() {
120 observer_.reset(NULL); 120 observer_.reset(NULL);
121 listener_->MouseMovedOutOfHost(); 121 listener_->MouseMovedOutOfHost();
122 } 122 }
123 123
124 } // namespace views 124 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/event_monitor_aura.h ('k') | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698