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

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

Issue 11364062: ui: Remove TouchStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/system_gesture_event_filter.h ('k') | ash/wm/system_modal_container_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/system_gesture_event_filter.h" 5 #include "ash/wm/system_gesture_event_filter.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (event->type() == ui::ET_MOUSE_PRESSED && event->native_event() && 65 if (event->type() == ui::ET_MOUSE_PRESSED && event->native_event() &&
66 ui::TouchFactory::GetInstance()->IsTouchDevicePresent() && 66 ui::TouchFactory::GetInstance()->IsTouchDevicePresent() &&
67 Shell::GetInstance()->delegate()) { 67 Shell::GetInstance()->delegate()) {
68 Shell::GetInstance()->delegate()->RecordUserMetricsAction( 68 Shell::GetInstance()->delegate()->RecordUserMetricsAction(
69 UMA_MOUSE_DOWN); 69 UMA_MOUSE_DOWN);
70 } 70 }
71 #endif 71 #endif
72 return false; 72 return false;
73 } 73 }
74 74
75 ui::TouchStatus SystemGestureEventFilter::PreHandleTouchEvent( 75 ui::EventResult SystemGestureEventFilter::PreHandleTouchEvent(
76 aura::Window* target, 76 aura::Window* target,
77 ui::TouchEvent* event) { 77 ui::TouchEvent* event) {
78 touch_uma_.RecordTouchEvent(target, *event); 78 touch_uma_.RecordTouchEvent(target, *event);
79 long_press_affordance_->ProcessEvent(target, event, event->touch_id()); 79 long_press_affordance_->ProcessEvent(target, event, event->touch_id());
80 return ui::TOUCH_STATUS_UNKNOWN; 80 return ui::ER_UNHANDLED;
81 } 81 }
82 82
83 ui::EventResult SystemGestureEventFilter::PreHandleGestureEvent( 83 ui::EventResult SystemGestureEventFilter::PreHandleGestureEvent(
84 aura::Window* target, 84 aura::Window* target,
85 ui::GestureEvent* event) { 85 ui::GestureEvent* event) {
86 touch_uma_.RecordGestureEvent(target, *event); 86 touch_uma_.RecordGestureEvent(target, *event);
87 long_press_affordance_->ProcessEvent(target, event, 87 long_press_affordance_->ProcessEvent(target, event,
88 event->GetLowestTouchId()); 88 event->GetLowestTouchId());
89 89
90 if (!target || target == target->GetRootWindow()) { 90 if (!target || target == target->GetRootWindow()) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (find == pinch_handlers_.end()) { 162 if (find == pinch_handlers_.end()) {
163 // The handler may have already been removed. 163 // The handler may have already been removed.
164 return; 164 return;
165 } 165 }
166 delete (*find).second; 166 delete (*find).second;
167 pinch_handlers_.erase(find); 167 pinch_handlers_.erase(find);
168 window->RemoveObserver(this); 168 window->RemoveObserver(this);
169 } 169 }
170 } // namespace internal 170 } // namespace internal
171 } // namespace ash 171 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/system_gesture_event_filter.h ('k') | ash/wm/system_modal_container_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698