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

Side by Side Diff: ui/views/widget/desktop_native_widget_aura.cc

Issue 10964051: events: Clean up dispatching code for touch-events. (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
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 "ui/views/widget/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_native_widget_aura.h"
6 6
7 #include "ui/aura/root_window.h" 7 #include "ui/aura/root_window.h"
8 #include "ui/aura/root_window_host.h" 8 #include "ui/aura/root_window_host.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/base/hit_test.h" 10 #include "ui/base/hit_test.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 429
430 // Convert unprocessed scroll events into wheel events. 430 // Convert unprocessed scroll events into wheel events.
431 ui::MouseWheelEvent mwe(*static_cast<ui::ScrollEvent*>(event)); 431 ui::MouseWheelEvent mwe(*static_cast<ui::ScrollEvent*>(event));
432 return native_widget_delegate_->OnMouseEvent(mwe) ? 432 return native_widget_delegate_->OnMouseEvent(mwe) ?
433 ui::ER_HANDLED : ui::ER_UNHANDLED; 433 ui::ER_HANDLED : ui::ER_UNHANDLED;
434 } 434 }
435 return native_widget_delegate_->OnMouseEvent(*event) ? 435 return native_widget_delegate_->OnMouseEvent(*event) ?
436 ui::ER_HANDLED : ui::ER_UNHANDLED; 436 ui::ER_HANDLED : ui::ER_UNHANDLED;
437 } 437 }
438 438
439 ui::TouchStatus DesktopNativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) { 439 ui::EventResult DesktopNativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) {
440 return native_widget_delegate_->OnTouchEvent(*event); 440 ui::TouchStatus status = native_widget_delegate_->OnTouchEvent(*event);
441 switch (status) {
442 case ui::TOUCH_STATUS_UNKNOWN:
Ben Goodger (Google) 2012/09/26 19:42:48 should you have a function in ui/base/events that
sadrul 2012/09/26 21:26:05 Done.
443 return ui::ER_UNHANDLED;
444
445 case ui::TOUCH_STATUS_START:
446 case ui::TOUCH_STATUS_CONTINUE:
447 case ui::TOUCH_STATUS_END:
448 return ui::ER_CONSUMED;
449
450 case ui::TOUCH_STATUS_QUEUED:
451 case ui::TOUCH_STATUS_QUEUED_END:
452 return ui::ER_ASYNC;
453 }
454
455 NOTREACHED();
456 return ui::ER_UNHANDLED;
441 } 457 }
442 458
443 ui::EventResult DesktopNativeWidgetAura::OnGestureEvent( 459 ui::EventResult DesktopNativeWidgetAura::OnGestureEvent(
444 ui::GestureEvent* event) { 460 ui::GestureEvent* event) {
445 return native_widget_delegate_->OnGestureEvent(*event); 461 return native_widget_delegate_->OnGestureEvent(*event);
446 } 462 }
447 463
448 } // namespace views 464 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698