| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/view.h" | 5 #include "views/view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 } | 768 } |
| 769 | 769 |
| 770 void View::OnMouseExited(const MouseEvent& event) { | 770 void View::OnMouseExited(const MouseEvent& event) { |
| 771 } | 771 } |
| 772 | 772 |
| 773 ui::TouchStatus View::OnTouchEvent(const TouchEvent& event) { | 773 ui::TouchStatus View::OnTouchEvent(const TouchEvent& event) { |
| 774 DVLOG(1) << "visited the OnTouchEvent"; | 774 DVLOG(1) << "visited the OnTouchEvent"; |
| 775 return ui::TOUCH_STATUS_UNKNOWN; | 775 return ui::TOUCH_STATUS_UNKNOWN; |
| 776 } | 776 } |
| 777 | 777 |
| 778 ui::GestureStatus View::OnGestureEvent(const GestureEvent& event) { |
| 779 return ui::GESTURE_STATUS_UNKNOWN; |
| 780 } |
| 781 |
| 778 void View::SetMouseHandler(View *new_mouse_handler) { | 782 void View::SetMouseHandler(View *new_mouse_handler) { |
| 779 // It is valid for new_mouse_handler to be NULL | 783 // It is valid for new_mouse_handler to be NULL |
| 780 if (parent_) | 784 if (parent_) |
| 781 parent_->SetMouseHandler(new_mouse_handler); | 785 parent_->SetMouseHandler(new_mouse_handler); |
| 782 } | 786 } |
| 783 | 787 |
| 784 bool View::OnKeyPressed(const KeyEvent& event) { | 788 bool View::OnKeyPressed(const KeyEvent& event) { |
| 785 return false; | 789 return false; |
| 786 } | 790 } |
| 787 | 791 |
| (...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1922 } | 1926 } |
| 1923 // WARNING: we may have been deleted. | 1927 // WARNING: we may have been deleted. |
| 1924 } | 1928 } |
| 1925 | 1929 |
| 1926 ui::TouchStatus View::ProcessTouchEvent(const TouchEvent& event) { | 1930 ui::TouchStatus View::ProcessTouchEvent(const TouchEvent& event) { |
| 1927 // TODO(rjkroege): Implement a grab scheme similar to as as is found in | 1931 // TODO(rjkroege): Implement a grab scheme similar to as as is found in |
| 1928 // MousePressed. | 1932 // MousePressed. |
| 1929 return OnTouchEvent(event); | 1933 return OnTouchEvent(event); |
| 1930 } | 1934 } |
| 1931 | 1935 |
| 1936 ui::GestureStatus View::ProcessGestureEvent(const GestureEvent& event) { |
| 1937 // TODO(Gajen): Implement a grab scheme similar to as as is found in |
| 1938 // MousePressed. |
| 1939 return OnGestureEvent(event); |
| 1940 } |
| 1941 |
| 1932 // Accelerators ---------------------------------------------------------------- | 1942 // Accelerators ---------------------------------------------------------------- |
| 1933 | 1943 |
| 1934 void View::RegisterPendingAccelerators() { | 1944 void View::RegisterPendingAccelerators() { |
| 1935 if (!accelerators_.get() || | 1945 if (!accelerators_.get() || |
| 1936 registered_accelerator_count_ == accelerators_->size()) { | 1946 registered_accelerator_count_ == accelerators_->size()) { |
| 1937 // No accelerators are waiting for registration. | 1947 // No accelerators are waiting for registration. |
| 1938 return; | 1948 return; |
| 1939 } | 1949 } |
| 1940 | 1950 |
| 1941 if (!GetWidget()) { | 1951 if (!GetWidget()) { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2067 | 2077 |
| 2068 OSExchangeData data; | 2078 OSExchangeData data; |
| 2069 WriteDragData(press_pt, &data); | 2079 WriteDragData(press_pt, &data); |
| 2070 | 2080 |
| 2071 // Message the RootView to do the drag and drop. That way if we're removed | 2081 // Message the RootView to do the drag and drop. That way if we're removed |
| 2072 // the RootView can detect it and avoid calling us back. | 2082 // the RootView can detect it and avoid calling us back. |
| 2073 GetWidget()->RunShellDrag(this, data, drag_operations); | 2083 GetWidget()->RunShellDrag(this, data, drag_operations); |
| 2074 } | 2084 } |
| 2075 | 2085 |
| 2076 } // namespace views | 2086 } // namespace views |
| OLD | NEW |