OLD | NEW |
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 Loading... |
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 return ui::EventResultFromTouchStatus(status); |
441 } | 442 } |
442 | 443 |
443 ui::EventResult DesktopNativeWidgetAura::OnGestureEvent( | 444 ui::EventResult DesktopNativeWidgetAura::OnGestureEvent( |
444 ui::GestureEvent* event) { | 445 ui::GestureEvent* event) { |
445 return native_widget_delegate_->OnGestureEvent(*event); | 446 return native_widget_delegate_->OnGestureEvent(*event); |
446 } | 447 } |
447 | 448 |
448 } // namespace views | 449 } // namespace views |
OLD | NEW |