| 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 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 } | 783 } |
| 784 | 784 |
| 785 void View::OnMouseExited(const MouseEvent& event) { | 785 void View::OnMouseExited(const MouseEvent& event) { |
| 786 } | 786 } |
| 787 | 787 |
| 788 ui::TouchStatus View::OnTouchEvent(const TouchEvent& event) { | 788 ui::TouchStatus View::OnTouchEvent(const TouchEvent& event) { |
| 789 DVLOG(1) << "visited the OnTouchEvent"; | 789 DVLOG(1) << "visited the OnTouchEvent"; |
| 790 return ui::TOUCH_STATUS_UNKNOWN; | 790 return ui::TOUCH_STATUS_UNKNOWN; |
| 791 } | 791 } |
| 792 | 792 |
| 793 ui::GestureStatus View::OnGestureEvent(const GestureEvent& event) { |
| 794 DVLOG(1) << "visited the OnGestureEvent"; |
| 795 return ui::GESTURE_STATUS_UNKNOWN; |
| 796 } |
| 797 |
| 793 void View::SetMouseHandler(View *new_mouse_handler) { | 798 void View::SetMouseHandler(View *new_mouse_handler) { |
| 794 // It is valid for new_mouse_handler to be NULL | 799 // It is valid for new_mouse_handler to be NULL |
| 795 if (parent_) | 800 if (parent_) |
| 796 parent_->SetMouseHandler(new_mouse_handler); | 801 parent_->SetMouseHandler(new_mouse_handler); |
| 797 } | 802 } |
| 798 | 803 |
| 799 bool View::OnKeyPressed(const KeyEvent& event) { | 804 bool View::OnKeyPressed(const KeyEvent& event) { |
| 800 return false; | 805 return false; |
| 801 } | 806 } |
| 802 | 807 |
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 } | 1935 } |
| 1931 // WARNING: we may have been deleted. | 1936 // WARNING: we may have been deleted. |
| 1932 } | 1937 } |
| 1933 | 1938 |
| 1934 ui::TouchStatus View::ProcessTouchEvent(const TouchEvent& event) { | 1939 ui::TouchStatus View::ProcessTouchEvent(const TouchEvent& event) { |
| 1935 // TODO(rjkroege): Implement a grab scheme similar to as as is found in | 1940 // TODO(rjkroege): Implement a grab scheme similar to as as is found in |
| 1936 // MousePressed. | 1941 // MousePressed. |
| 1937 return OnTouchEvent(event); | 1942 return OnTouchEvent(event); |
| 1938 } | 1943 } |
| 1939 | 1944 |
| 1945 ui::GestureStatus View::ProcessGestureEvent(const GestureEvent& event) { |
| 1946 // TODO(Gajen): Implement a grab scheme similar to as as is found in |
| 1947 // MousePressed. |
| 1948 return OnGestureEvent(event); |
| 1949 } |
| 1950 |
| 1940 // Accelerators ---------------------------------------------------------------- | 1951 // Accelerators ---------------------------------------------------------------- |
| 1941 | 1952 |
| 1942 void View::RegisterPendingAccelerators() { | 1953 void View::RegisterPendingAccelerators() { |
| 1943 if (!accelerators_.get() || | 1954 if (!accelerators_.get() || |
| 1944 registered_accelerator_count_ == accelerators_->size()) { | 1955 registered_accelerator_count_ == accelerators_->size()) { |
| 1945 // No accelerators are waiting for registration. | 1956 // No accelerators are waiting for registration. |
| 1946 return; | 1957 return; |
| 1947 } | 1958 } |
| 1948 | 1959 |
| 1949 if (!GetWidget()) { | 1960 if (!GetWidget()) { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2075 | 2086 |
| 2076 OSExchangeData data; | 2087 OSExchangeData data; |
| 2077 WriteDragData(press_pt, &data); | 2088 WriteDragData(press_pt, &data); |
| 2078 | 2089 |
| 2079 // Message the RootView to do the drag and drop. That way if we're removed | 2090 // Message the RootView to do the drag and drop. That way if we're removed |
| 2080 // the RootView can detect it and avoid calling us back. | 2091 // the RootView can detect it and avoid calling us back. |
| 2081 GetWidget()->RunShellDrag(this, data, drag_operations); | 2092 GetWidget()->RunShellDrag(this, data, drag_operations); |
| 2082 } | 2093 } |
| 2083 | 2094 |
| 2084 } // namespace views | 2095 } // namespace views |
| OLD | NEW |