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

Side by Side Diff: ash/wm/overlay_event_filter.cc

Issue 10912063: events: Get rid of GestureStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/overlay_event_filter.h ('k') | ash/wm/panel_window_event_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/wm/overlay_event_filter.h" 5 #include "ash/wm/overlay_event_filter.h"
6 6
7 #include "ash/wm/partial_screenshot_view.h" 7 #include "ash/wm/partial_screenshot_view.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/aura/window_delegate.h" 9 #include "ui/aura/window_delegate.h"
10 #include "ui/base/event.h" 10 #include "ui/base/event.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return true; 57 return true;
58 } 58 }
59 return false; // Not handled. 59 return false; // Not handled.
60 } 60 }
61 61
62 ui::TouchStatus OverlayEventFilter::PreHandleTouchEvent( 62 ui::TouchStatus OverlayEventFilter::PreHandleTouchEvent(
63 aura::Window* target, ui::TouchEvent* event) { 63 aura::Window* target, ui::TouchEvent* event) {
64 return ui::TOUCH_STATUS_UNKNOWN; // Not handled. 64 return ui::TOUCH_STATUS_UNKNOWN; // Not handled.
65 } 65 }
66 66
67 ui::GestureStatus OverlayEventFilter::PreHandleGestureEvent( 67 ui::EventResult OverlayEventFilter::PreHandleGestureEvent(
68 aura::Window* target, ui::GestureEvent* event) { 68 aura::Window* target, ui::GestureEvent* event) {
69 return ui::GESTURE_STATUS_UNKNOWN; // Not handled. 69 return ui::ER_UNHANDLED; // Not handled.
70 } 70 }
71 71
72 void OverlayEventFilter::OnLoginStateChanged( 72 void OverlayEventFilter::OnLoginStateChanged(
73 user::LoginStatus status) { 73 user::LoginStatus status) {
74 Cancel(); 74 Cancel();
75 } 75 }
76 76
77 void OverlayEventFilter::OnAppTerminating() { 77 void OverlayEventFilter::OnAppTerminating() {
78 Cancel(); 78 Cancel();
79 } 79 }
80 80
81 void OverlayEventFilter::OnLockStateChanged(bool locked) { 81 void OverlayEventFilter::OnLockStateChanged(bool locked) {
82 Cancel(); 82 Cancel();
83 } 83 }
84 84
85 void OverlayEventFilter::Activate(Delegate* delegate) { 85 void OverlayEventFilter::Activate(Delegate* delegate) {
86 delegate_ = delegate; 86 delegate_ = delegate;
87 } 87 }
88 88
89 void OverlayEventFilter::Deactivate() { 89 void OverlayEventFilter::Deactivate() {
90 delegate_ = NULL; 90 delegate_ = NULL;
91 } 91 }
92 92
93 void OverlayEventFilter::Cancel() { 93 void OverlayEventFilter::Cancel() {
94 if (delegate_) 94 if (delegate_)
95 delegate_->Cancel(); 95 delegate_->Cancel();
96 } 96 }
97 } // namespace internal 97 } // namespace internal
98 } // namespace ash 98 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overlay_event_filter.h ('k') | ash/wm/panel_window_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698