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

Side by Side Diff: ash/touch/touch_observer_hud.cc

Issue 10831240: Remove TouchEvent interface, and rename TouchEventImpl to TouchEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge-tot Created 8 years, 4 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/touch/touch_observer_hud.h ('k') | ash/touch/touch_uma.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/touch/touch_observer_hud.h" 5 #include "ash/touch/touch_observer_hud.h"
6 6
7 #include "ash/shell_window_ids.h" 7 #include "ash/shell_window_ids.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "third_party/skia/include/core/SkPath.h" 10 #include "third_party/skia/include/core/SkPath.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return false; 187 return false;
188 } 188 }
189 189
190 bool TouchObserverHUD::PreHandleMouseEvent(aura::Window* target, 190 bool TouchObserverHUD::PreHandleMouseEvent(aura::Window* target,
191 ui::MouseEvent* event) { 191 ui::MouseEvent* event) {
192 return false; 192 return false;
193 } 193 }
194 194
195 ui::TouchStatus TouchObserverHUD::PreHandleTouchEvent( 195 ui::TouchStatus TouchObserverHUD::PreHandleTouchEvent(
196 aura::Window* target, 196 aura::Window* target,
197 ui::TouchEventImpl* event) { 197 ui::TouchEvent* event) {
198 if (event->touch_id() >= kMaxTouchPoints) 198 if (event->touch_id() >= kMaxTouchPoints)
199 return ui::TOUCH_STATUS_UNKNOWN; 199 return ui::TOUCH_STATUS_UNKNOWN;
200 200
201 if (event->type() != ui::ET_TOUCH_CANCELLED) 201 if (event->type() != ui::ET_TOUCH_CANCELLED)
202 touch_positions_[event->touch_id()] = event->root_location(); 202 touch_positions_[event->touch_id()] = event->root_location();
203 if (event->type() == ui::ET_TOUCH_PRESSED) 203 if (event->type() == ui::ET_TOUCH_PRESSED)
204 canvas_->Start(event->touch_id(), touch_positions_[event->touch_id()]); 204 canvas_->Start(event->touch_id(), touch_positions_[event->touch_id()]);
205 else 205 else
206 canvas_->Update(event->touch_id(), touch_positions_[event->touch_id()]); 206 canvas_->Update(event->touch_id(), touch_positions_[event->touch_id()]);
207 touch_status_[event->touch_id()] = event->type(); 207 touch_status_[event->touch_id()] = event->type();
(...skipping 11 matching lines...) Expand all
219 return ui::GESTURE_STATUS_UNKNOWN; 219 return ui::GESTURE_STATUS_UNKNOWN;
220 } 220 }
221 221
222 void TouchObserverHUD::OnWidgetClosing(views::Widget* widget) { 222 void TouchObserverHUD::OnWidgetClosing(views::Widget* widget) {
223 DCHECK_EQ(widget, widget_); 223 DCHECK_EQ(widget, widget_);
224 widget_ = NULL; 224 widget_ = NULL;
225 } 225 }
226 226
227 } // namespace internal 227 } // namespace internal
228 } // namespace ash 228 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_observer_hud.h ('k') | ash/touch/touch_uma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698