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/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
10 #include "ui/aura/client/activation_change_observer.h" | 10 #include "ui/aura/client/activation_change_observer.h" |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 | 868 |
869 // Convert unprocessed scroll events into wheel events. | 869 // Convert unprocessed scroll events into wheel events. |
870 ui::MouseWheelEvent mwe(*static_cast<ui::ScrollEvent*>(event)); | 870 ui::MouseWheelEvent mwe(*static_cast<ui::ScrollEvent*>(event)); |
871 return delegate_->OnMouseEvent(mwe) ? ui::ER_HANDLED : ui::ER_UNHANDLED; | 871 return delegate_->OnMouseEvent(mwe) ? ui::ER_HANDLED : ui::ER_UNHANDLED; |
872 } | 872 } |
873 if (tooltip_manager_.get()) | 873 if (tooltip_manager_.get()) |
874 tooltip_manager_->UpdateTooltip(); | 874 tooltip_manager_->UpdateTooltip(); |
875 return delegate_->OnMouseEvent(*event) ? ui::ER_HANDLED : ui::ER_UNHANDLED; | 875 return delegate_->OnMouseEvent(*event) ? ui::ER_HANDLED : ui::ER_UNHANDLED; |
876 } | 876 } |
877 | 877 |
878 ui::TouchStatus NativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) { | 878 ui::EventResult NativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) { |
879 DCHECK(window_->IsVisible()); | 879 DCHECK(window_->IsVisible()); |
880 return delegate_->OnTouchEvent(*event); | 880 ui::TouchStatus status = delegate_->OnTouchEvent(*event); |
| 881 return ui::EventResultFromTouchStatus(status); |
881 } | 882 } |
882 | 883 |
883 ui::EventResult NativeWidgetAura::OnGestureEvent(ui::GestureEvent* event) { | 884 ui::EventResult NativeWidgetAura::OnGestureEvent(ui::GestureEvent* event) { |
884 DCHECK(window_->IsVisible()); | 885 DCHECK(window_->IsVisible()); |
885 return delegate_->OnGestureEvent(*event); | 886 return delegate_->OnGestureEvent(*event); |
886 } | 887 } |
887 | 888 |
888 //////////////////////////////////////////////////////////////////////////////// | 889 //////////////////////////////////////////////////////////////////////////////// |
889 // NativeWidgetAura, aura::ActivationDelegate implementation: | 890 // NativeWidgetAura, aura::ActivationDelegate implementation: |
890 | 891 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 return aura::Env::GetInstance()->is_mouse_button_down(); | 1066 return aura::Env::GetInstance()->is_mouse_button_down(); |
1066 } | 1067 } |
1067 | 1068 |
1068 // static | 1069 // static |
1069 bool NativeWidgetPrivate::IsTouchDown() { | 1070 bool NativeWidgetPrivate::IsTouchDown() { |
1070 return aura::Env::GetInstance()->is_touch_down(); | 1071 return aura::Env::GetInstance()->is_touch_down(); |
1071 } | 1072 } |
1072 | 1073 |
1073 } // namespace internal | 1074 } // namespace internal |
1074 } // namespace views | 1075 } // namespace views |
OLD | NEW |