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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. | 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. |
6 | 6 |
7 #include "ui/views/view.h" | 7 #include "ui/views/view.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 } | 868 } |
869 | 869 |
870 ui::EventResult View::OnKeyEvent(ui::KeyEvent* event) { | 870 ui::EventResult View::OnKeyEvent(ui::KeyEvent* event) { |
871 return ui::ER_UNHANDLED; | 871 return ui::ER_UNHANDLED; |
872 } | 872 } |
873 | 873 |
874 ui::EventResult View::OnMouseEvent(ui::MouseEvent* event) { | 874 ui::EventResult View::OnMouseEvent(ui::MouseEvent* event) { |
875 return ui::ER_UNHANDLED; | 875 return ui::ER_UNHANDLED; |
876 } | 876 } |
877 | 877 |
878 ui::EventResult View::OnScrollEvent(ui::ScrollEvent* event) { | 878 void View::OnScrollEvent(ui::ScrollEvent* event) { |
879 return ui::ER_UNHANDLED; | |
880 } | 879 } |
881 | 880 |
882 ui::EventResult View::OnTouchEvent(ui::TouchEvent* event) { | 881 void View::OnTouchEvent(ui::TouchEvent* event) { |
883 return ui::ER_UNHANDLED; | |
884 } | 882 } |
885 | 883 |
886 void View::OnGestureEvent(ui::GestureEvent* event) { | 884 void View::OnGestureEvent(ui::GestureEvent* event) { |
887 } | 885 } |
888 | 886 |
889 ui::TextInputClient* View::GetTextInputClient() { | 887 ui::TextInputClient* View::GetTextInputClient() { |
890 return NULL; | 888 return NULL; |
891 } | 889 } |
892 | 890 |
893 InputMethod* View::GetInputMethod() { | 891 InputMethod* View::GetInputMethod() { |
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1987 if (HitTestPoint(location)) { | 1985 if (HitTestPoint(location)) { |
1988 ConvertPointToScreen(this, &location); | 1986 ConvertPointToScreen(this, &location); |
1989 ShowContextMenu(location, true); | 1987 ShowContextMenu(location, true); |
1990 } | 1988 } |
1991 } else { | 1989 } else { |
1992 OnMouseReleased(event); | 1990 OnMouseReleased(event); |
1993 } | 1991 } |
1994 // WARNING: we may have been deleted. | 1992 // WARNING: we may have been deleted. |
1995 } | 1993 } |
1996 | 1994 |
1997 ui::EventResult View::ProcessTouchEvent(ui::TouchEvent* event) { | 1995 void View::ProcessTouchEvent(ui::TouchEvent* event) { |
1998 return OnTouchEvent(event); | 1996 OnTouchEvent(event); |
1999 } | 1997 } |
2000 | 1998 |
2001 void View::ProcessGestureEvent(ui::GestureEvent* event) { | 1999 void View::ProcessGestureEvent(ui::GestureEvent* event) { |
2002 OnGestureEvent(event); | 2000 OnGestureEvent(event); |
2003 if (event->handled()) | 2001 if (event->handled()) |
2004 return; | 2002 return; |
2005 | 2003 |
2006 if (CommandLine::ForCurrentProcess()->HasSwitch( | 2004 if (CommandLine::ForCurrentProcess()->HasSwitch( |
2007 switches::kEnableTouchDragDrop)) { | 2005 switches::kEnableTouchDragDrop)) { |
2008 if (event->type() == ui::ET_GESTURE_LONG_PRESS && | 2006 if (event->type() == ui::ET_GESTURE_LONG_PRESS && |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2166 ConvertPointToWidget(this, &widget_location); | 2164 ConvertPointToWidget(this, &widget_location); |
2167 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations, | 2165 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations, |
2168 source); | 2166 source); |
2169 return true; | 2167 return true; |
2170 #else | 2168 #else |
2171 return false; | 2169 return false; |
2172 #endif // !defined(OS_MACOSX) | 2170 #endif // !defined(OS_MACOSX) |
2173 } | 2171 } |
2174 | 2172 |
2175 } // namespace views | 2173 } // namespace views |
OLD | NEW |