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

Side by Side Diff: ui/views/widget/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, 2 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 | « ui/views/widget/native_widget_aura.h ('k') | no next file » | 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 "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
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698